using System; public class Test { public static void Main() { long w = long.Parse(Console.ReadLine()); long d = long.Parse(Console.ReadLine()); while (1 < d) { w -= w/(d*d--); } Console.WriteLine(w); } }