import java.util.Scanner; public class N314 { static int cnt=0; static int n; public static void main(String[] args) { Scanner sc=new Scanner(System.in); n=sc.nextInt(); int length=2; int[] state=new int[3]; int[] buf=new int[3]; int beki=(int)Math.pow(10, 9)+7; state[0]=1;state[1]=1;state[2]=0; if(n>2) { while(length!=n) { for(int i=0;i<3;i++) { buf[i]=state[i]; } state[0]=buf[2]%beki; state[1]=(buf[0]+buf[2])%beki; state[2]=buf[1]%beki; length++; } for(int i=0;i<3;i++) { cnt+=state[i]; } } else {cnt=n;} System.out.println(cnt%beki); } }