using System; class Program { static void Main(string[] args) { var n = ulong.Parse(Console.ReadLine()); Console.WriteLine(n % 1000000007); } }