using System; namespace prob299 { class Program { static void Main(string[] args) { long a = int.Parse(Console.ReadLine()); long b = 316 + (52 * (a - 1)); Console.WriteLine(b); } } }