#-*-coding:utf-8-*-
#有一分数序列:2/1,3/2,5/3,8/5.13/8.21/13,....求出这个数列的前二十项之和
t = int(input('请输入想算到第几项:'))
(a,b,c) = (2,1,0)
for d in range(1,t+1):
    c += a/b
    b,a = a,a+b
print('前{0}项之和为:{1}'.format(t,c))
