using System; class Program { static void Main() { string text = Console.ReadLine(); int inWorkCount = int.Parse(text); text = Console.ReadLine(); int day = int.Parse(text); int workCount = inWorkCount; for (int loop1 = 0; loop1 < day - 1; loop1++) workCount -= workCount / (int) Math.Pow(day - loop1, 2); Console.WriteLine(workCount.ToString()); } }