n = gets.to_i a = Array.new(n) a[0] = [0,1,0] MOD = 1000000007 1.upto(n - 1){|i| a[i] = Array.new(3) a[i][0] = (a[i - 1][1] + a[i - 1][2]) % MOD a[i][1] = a[i - 1][0] a[i][2] = a[i - 1][1] } p a[n - 1].inject(:+) % MOD