#D4980. Cornering at Poles

    ID: 4137 Type: Default 3000ms 268MiB

Cornering at Poles

Cornering at Poles

Example

Input

8 900 0 40 100 70 -80 350 30 680 -20 230 230 300 400 530 130 75 -275

Output

1210.99416

inputFormat

Input

8 900 0 40 100 70 -80 350 30 680 -20 230 230 300 400 530 130 75 -275

outputFormat

Output

1210.99416

样例

8 900 0
40 100
70 -80
350 30
680 -20
230 230
300 400
530 130
75 -275
1210.99416