29 lines
551 B
Python
Executable File
29 lines
551 B
Python
Executable File
# print("Введите число N")
|
|
# N = int(input())
|
|
#
|
|
# def fac(x: int): # факториал числа
|
|
# return _fac (x*2, x)
|
|
#
|
|
# def _fac(x: int, y: int):
|
|
# if x > y:
|
|
# return (y * _fac(x, y+1))
|
|
# else:
|
|
# return y
|
|
#
|
|
# x = 0
|
|
# if N <= 12:
|
|
# for i in range(1, N+1):
|
|
# step = i**i
|
|
# factorial = fac(i)
|
|
# x += step / factorial
|
|
# print(x)
|
|
|
|
N = int(input())
|
|
s = 0
|
|
for i in range(1, N + 1):
|
|
p = 1
|
|
for j in range(i, 2 * i + 1):
|
|
p *= j
|
|
s += i**2 / p
|
|
|
|
print(s) |