M = 10**9 + 7 N = int(raw_input()) x = [0, 1, 0] for i in range(N-1): y = [0, 0, 0] y[0] = (x[1] + x[2]) % M y[1] = x[0] y[2] = x[1] x = y print sum(x) % M