package no_0314; import java.math.BigInteger; import java.util.Scanner; public class KenkenPa03 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); // while(true) { int N = sc.nextInt(); BigInteger ways = new BigInteger("0"); BigInteger[][] prev = {{new BigInteger("0"), new BigInteger("0")}, {new BigInteger("1"), new BigInteger("1")}}; if(N == 1) { ways = new BigInteger("1"); System.out.println(ways); return; }else if(N == 2) { ways = new BigInteger("2"); System.out.println(ways); return; } for(int i = 3; i <= N; i++) { BigInteger[][] temp = new BigInteger[2][2]; temp[1][1] = prev[0][1]; temp[1][0] = prev[0][1]; temp[1][0] = temp[1][0].add(prev[1][1]); temp[0][1] = prev[1][0]; prev = temp.clone(); } // for(long[] p: prev) { // ways += LongStream.of(p).sum(); // } // for(long[] p: prev) { // System.out.println(Arrays.toString(p)); // } ways = ways.add(prev[0][1]); ways = ways.add(prev[1][0]); ways = ways.add(prev[1][1]); System.out.println(ways.mod(new BigInteger("1000000007"))); // } } }