#!/usr/bin/env python3 import numpy M = 1000000007 def mod_mul(a, b, mod=M): return numpy.matmul(a, b) % mod def mod_pow(a, n, mod=M): b = numpy.eye(len(a), dtype=a.dtype) while n > 0: if n % 2 == 1: b = mod_mul(a, b, mod) a = mod_mul(a, a, mod) n //= 2 return b def solve(n, mod=M): a = numpy.array([[1, 1], [1, 0]], dtype=numpy.int64) v = numpy.array([1, 0], dtype=a.dtype) res = mod_mul(mod_pow(a, n, mod), v, mod) return res[0] * res[1] % mod def main(): print(solve(int(input()))) if __name__ == '__main__': main()