# -*- coding: utf-8 -*- import time N = input() memo = [1L, 0L, 0L] cnt = 1 while cnt < N: memo[0], memo[1], memo[2] = memo[2] % 1000000007, memo[0] % 1000000007, (memo[0] + memo[1]) % 1000000007 cnt += 1 print sum(memo) % 1000000007