e-olymp

Sum - 3

Calculate the sum of a sequence of numbers. Note: that n is the option number.

n=1: 1/2 + 2/3 + 3/4 + 4/5 + 5/6 + 6/7 + 7/8 + 8/9 + 9/10 + 10/11

n=2: 1/2 + 3/4 + 5/6 + 7/8 + 9/10 + 11/12 + 13/14 + 15/16 + 17/18 + 19/20

n=3: 1/1 + 2/3 + 3/5 + 4/7 + 5/9 + 6/11 + 7/13 + 8/15 + 9/17 + 10/19

n=4: 2/3 + 4/5 + 6/7 + 8/9 + 10/11 + 12/13 + 14/15 + 16/17 + 18/19 + 20/21

n=5: 1/3 + 3/6 + 5/9 + 7/12 + 9/15 + 11/18 + 13/21 + 15/24 + 17/27 + 19/30

n=6: 1/2 + 2/5 + 3/8 + 4/11 + 5/14 + 6/17 + 7/20 + 8/23 + 9/26 + 10/29

Input:

The only number n, 1n6

Output:

The value of the sum of the sequence with an accuracy of 0.01

Zaman məhdudiyyəti 1 saniyə
Yaddaşı istafadə məhdudiyyəti 64 MiB