using System; using System.Linq; using System.Collections.Generic; class AOJ { static void Main() { long w = long.Parse(Console.ReadLine()); long d = long.Parse(Console.ReadLine()); while (d > 1) { w -= w / (d * d); d--; } Console.WriteLine(w); } }