#The solution in Python 3 is as follows:
import sys
A = [0, 1]
for _ in range(1000):
A.append(2*A[-2] + A[-1])
for ns in sys.stdin:
print(A[int(ns)-1])
#Keep visiting for more solutions of SPOJ problems in Python 3.Thank you!!!
If you want to hone your programming skills in python and improve your performance in competitive programming platforms, then this is the destination you are looking for. Happy Coding!!!