Today I went fishing alone with my canoe, unfortunately I fell asleep and the stream brought me away, I lost my oars, now it's night and I am lost in the ocean! I can't see the coast so I must be far away!
I have my cell phone but is malfunctional because it got wet by the salty water, I can't talk or hear anything because the mic and phone speaker are broken, but I can send SMS to my friend who is on the coast's beach!
My friend has a very powerful torch and he raised it on top of bamboo's canes to show me the right direction, but I can’t row because I have no oars, so I must tell him how far I am so he can send someone to catch me!
My friend told me that he is keeping the torch at 11.5 meters on the sea level, and I can see the light right over the horizon. Now I only remember from the school that the Earth radius should be 6371 Km at the sea level, and I’m sittin in my canoe so you can assume that my eyes are at sea level too.
Since the currents are moving me moment by moment, my friend is raising the torch from time to time (now it’s at 12.3 meters), please write a full program or function that will help me to calculate the distance from my friend’s position!
Take from standard input the torch height at the sea level, which I see right on top of the horizon, and output the distance between me and my friend.
Here is a diagram (not to scale):
The orange point labelled M is me, the red point labelled T is the torch. You're given h as input and should return the length of the green line.
Test cases:
All values in metres. You can use kilometres instead if you wish.
11.5 > 12105.08
13.8 > 13260.45
Shortest code wins.

