That depends on the bombs power.
For a 50 kiloton weapon if you are anywhere within 1 km of ground zero you can pretty much kiss your tush bye-bye. The greater distance you are from the explosion the greater your chance of survival is. Your're probably completely safe at about 20 kilometres, assuming you are not in the fallout zone.
Of course if the drop a bigger weapon on you then the range of destruction increases comparitively. The largest fission bombs are about 500 kilotons, and the largest thermonuclear bombs are even bigger than that. For these I would suggest about 30 to 50 km to be safe.