Distance from gamma ray?

how far would one have to be from a gamma ray burst in order for the average power from it to be equivalent to the average power from the sun's radiation at the earth (solar constant, 1300 watt/m^2)

I understand the problem, but I can't seem to find a formula that would solve for distance using units of the solar constant. The only thought I have is using the potential energy formula, but that is joules. Any hints on what formula to use? or solving it could also be helpful :-)

thanks

Oops, this is my first post, didn't notice the homework section, sorry about that!

Well, the power spreads out across the surface of an imaginary sphere centered at the sun. This gives you some figure in Energy/m^2. And since you're considering a 1 time explosion of the sun, might as well say it lasts just one second, for comparison's sake.