Arc on the sphere#865

Arc on the sphere

1 Sekunde
64 Megabyte
Sehr leicht

On the surface of the planet, which is a sphere of radius , two points are given by their latitude and longitude. Find the minimum path length along the surface of this planet from one point to another.

Eingabe

The first line contains the number , the second line contains the latitude and longitude of the first point, the third line contains the latitude and longitude of the second point.

Latitude is in degrees from to , longitude in degrees from to , 100 \le R \le 10000, all numbers are real.

Ausgabe

Print the length of the path with two digits after the decimal point.

Beispiele

Beispiel 1

Loading
Loading