n = int(input()) a = [1,1,1] N = n if n > 1: for i in range(N-1): b = a[0] + a[1] del a[0] a.append(b) print(a[2]%(10**9+7)) else: print(a[2])