sl = [0, 1, 2] for i in range(3, 20): sl.append(sl[i-1] + sl[i-2]) t = int(input()) for _ in range(t): n = int(input()) print(sl[n])