using System; class Program { static void Main() { long n = long.Parse(Console.ReadLine()); var a = new int[n]; var b = new int[n]; var c = new int[n]; a[0] = 1; int m = 1000000007; for (int i = 1; i < n; i++) { a[i] = c[i - 1] % m; b[i] = a[i - 1] % m; c[i] = (a[i - 1] + b[i - 1]) % m; } Console.WriteLine((a[n - 1] + b[n - 1] + c[n - 1]) % m); } }