fork download
  1. while True:
  2. j=x=int(input())
  3. y=1,1
  4. exec('y+=y[-2]+y[-1],;'*x)
  5. i=c=0
  6. while c<x:
  7. if j>=x:j=0;i+=1;t=i
  8. if t%y[~j]<1:t/=y[~j];j-=1
  9. if t<2:c+=1;j=x
  10. j+=1
  11. print(i)
Runtime error #stdin #stdout #stderr 0.07s 9984KB
stdin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
100
stdout
1
2
3
4
5
6
8
9
10
12
13
15
16
18
20
21
24
25
26
27
315
stderr
Traceback (most recent call last):
  File "./prog.py", line 2, in <module>
EOFError: EOF when reading a line