import java.util.Scanner; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); long n = in.nextLong(); long k = in.nextLong(); if(k == 1) { System.out.println(n / 2 + 1); } else { System.out.println(n / (k+1) + 1); } in.close(); } }