import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader buff = new BufferedReader(new InputStreamReader(System.in)); try { int W = Integer.parseInt(buff.readLine()); double D = Double.parseDouble(buff.readLine()); while(D > 1){ W -= (int)(W / Math.pow(D, 2)); D--; } System.out.println(W); } catch (NumberFormatException e) { } catch (IOException e) { } } }