n = int(raw_input()) p = (1,0,0) for _ in range(n-1): p = (p[2], p[0], p[0]+p[1]) print sum(p) % (10**9 + 7)