import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int L = sc.nextInt(), K = sc.nextInt(); int cnt = 0; while(true) { cnt+=K * 2; if(cnt >= L) { System.out.println(cnt / 2 - K); break; } } } }