#coding: utf-8 ##yuki_314 n=int(raw_input()) dp=[0 for i in xrange(1000001)] dp[0]=1 dp[1]=2 dp[2]=2 for i in xrange(3,n): dp[i]=(dp[i-2]+dp[i-3])%(10**9+7) print dp[n-1]