n = int(input()) fib = [0,1] v = 1 ans = 1 for i in range(2,n+1): fib.append(v) v = v - fib[i-2]+fib[i] ans += (fib[i]**2%1000000007) print(ans)