using System; namespace y { class Program { static void Main(string[] args) { var n = int.Parse(Console.ReadLine()); long k = 1; long kk = 0; long p = 0; long ans = 1; for (int i = 2; i <= n; i++) { var k2 = p % 1000000007; var kk2 = k % 1000000007; var p2 = (k + kk) % 1000000007; ans = (k2 + kk2 + p2) % 1000000007; k = k2; kk = kk2; p = p2; } Console.WriteLine(ans); } } }