If you’re an entrepreneur, you are most likely working on an idea you’re really passionate about. Passionate enough to quit your job, accept little or no money, get into debt, and eat stress as a main course every day. All for something you believe in. Right?

Now imagine going through all the above plus the stress of not knowing if you’ll even be in the U.S. next week to run your company. That’s what immigrant entrepreneurs go through soon after they start their company. Some manage to handle the stress and find a creative solution to their immigration issues. Some don’t.

Either way, it’s an incredibly tough time. I’ve been there and I barely made it through. So for all the immigrant entrepreneurs out there fighting on this front, let me give you some practical advice to dealing with the immigration policy of the great U.S. of A.

The ins and outs of immigration policy

The first thing you need to know about immigration policy in the U.S. is that it has nothing to do with logic. For example, if you were educated in the U.S., you still might be screwed. I was. (At least until Michael Serotte, the fourth immigration lawyer I worked with, came into my life.)

Here’s a brief overview of how things work: If you are lucky enough to come from a treaty country, you can get the E2, which is the closest thing to a startup visa out there. One requirement for this visa is to invest your own money in the company (the actual amount depends on the type of business — for IT, it runs about $50,000 to $60,000). Most entrepreneurs stop at that because they are young and broke — much like myself. But your family (either in the US or abroad) can help you invest in your company. The E2 gives you the right to run your company and even to “import” your fellow country-people for managerial positions, which we have done at my company, Knotch.

Now, if your country hasn’t signed a treaty with the U.S., then you’re stuck with the O1, or the H1B. The O1 is for “aliens of extraordinary abilities” (meaning that you’re too intelligent, famous, and successful for your own good). In general, it’s very difficult to get this visa. You’ll need a lawyer, a lot of attention in the press, plus letters of recommendation from “experts” in your field. If you’re in tech, this means prominent investors or serial entrepreneurs who are famous themselves. I wish you luck.

The H1B, or the “work visa,” is the common solution for most immigrant entrepreneurs, but it requires that you have a board that employs you. This is not ideal if you are the CEO. This solution just made me uncomfortable — I was starting a company, and all of a sudden I had to become someone else’s employee just to run it?

Facing immigration issues? Think like an entrepreneur

So, what should you do when you are facing highly irrational criteria and your options are limited and imperfect? Well, think like an entrepreneur. Get creative, don’t give up, and find other entrepreneurial minds who will help pull you out of the mess.

The first three lawyers I worked with would more often tell me why I could not stay in the U.S. than the opposite. I was quitting my job, starting a company, and raising money while at the same time panicking every day about being deported. I was fairly desperate. But I didn’t give up, I asked for introductions to any and all immigration lawyers that my acquaintances knew, and that’s when I met Michael. In 30 minutes, Michael had already planned two options for me. Then, in the span of three months, he helped me get two visas (first an H1B and then an E2) and maintain my status throughout.

My major takeaways? First, good things come not to those who wait but to those who don’t give up and who think outside of the box. Sure, I was lucky to find Michael, but more importantly, I was unwilling to give up until I found a solution to my problem. And in spite of the fact that three different lawyers told me to pack my bags, I knew that they were just not thinking at my level.

Second, I learned that as with most other aspects of life, there is always a solution to any problem. And the more limitations there are, the more creative entrepreneurial minds will become.

Are you a foreign-born entrepreneur that has struggled with immigration? What was your solution? Tell us your story in the comments section below.

Anda Gansca is the founder and CEO of Knotch, a mobile social network centered around expressing and gauging real-time opinions. Before Knotch, she started three nonprofit initiatives, worked in venture capital, and studied economics & international relations at Stanford University.