def Matprod(A, B, mod): N = len(A) temp = [[0] * N for i in range(N)] for i in range(N): for j in range(N): for k in range(N): temp[i][j] += A[i][k] * B[k][j] temp[i][j] %= mod return temp def Matpow(A, M, mod): N = len(A) Mat = [[0] * N for i in range(N)] for i in range(N): Mat[i][i] = 1 for i in range(64): if (M >> i) & 1: Mat = Matprod(Mat, A, mod) A = Matprod(A, A, mod) return Mat N = int(input()) mod = 10 ** 9 + 7 A = [[1, 1], [1, 0]] A = Matpow(A, N, mod) print(A[0][0] * A[1][0] % mod)