MOD = 10**9 + 7 max_n = 3 * 10**6 # Precompute the number of compositions into odd parts c = [0] * (max_n + 2) if max_n >= 1: c[1] = 1 if max_n >= 2: c[2] = 1 for n in range(3, max_n + 1): c[n] = (c[n-1] + c[n-2]) % MOD L = int(input()) if L % 2 == 1: cost = L ways = c[L] % MOD else: cost = L half = L // 2 c_half = c[half] ways = (c[L] - (c_half * c_half) % MOD) % MOD ways = (ways + MOD) % MOD # Ensure non-negative print(cost) print(ways)