import java.util.*;
import java.lang.*;
import java.util.stream.*;

public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        int n = Integer.parseInt(scanner.next());
        int d = Integer.parseInt(scanner.next());

        for(int i = 1; i < n; i++) {
            int bottom = i - d;
            int top = i + d;
            if(bottom == 1) {
                if(n % top == 0) {
                    System.out.println(n/top);
                    System.exit(0);
                } else {
                    System.out.println((n/top) + 1);
                    System.exit(0);
                }
            }
        }
        System.out.println(1);
    }
} import java.util.*; util.* java import java.lang.*; lang.* java import java.util.stream.*; stream.* java.util public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        int n = Integer.parseInt(scanner.next());
        int d = Integer.parseInt(scanner.next());

        for(int i = 1; i < n; i++) {
            int bottom = i - d;
            int top = i + d;
            if(bottom == 1) {
                if(n % top == 0) {
                    System.out.println(n/top);
                    System.exit(0);
                } else {
                    System.out.println((n/top) + 1);
                    System.exit(0);
                }
            }
        }
        System.out.println(1);
    }
} Main public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        int n = Integer.parseInt(scanner.next());
        int d = Integer.parseInt(scanner.next());

        for(int i = 1; i < n; i++) {
            int bottom = i - d;
            int top = i + d;
            if(bottom == 1) {
                if(n % top == 0) {
                    System.out.println(n/top);
                    System.exit(0);
                } else {
                    System.out.println((n/top) + 1);
                    System.exit(0);
                }
            }
        }
        System.out.println(1);
    } main {
        //コード
        Scanner scanner = new Scanner(System.in);
        int n = Integer.parseInt(scanner.next());
        int d = Integer.parseInt(scanner.next());

        for(int i = 1; i < n; i++) {
            int bottom = i - d;
            int top = i + d;
            if(bottom == 1) {
                if(n % top == 0) {
                    System.out.println(n/top);
                    System.exit(0);
                } else {
                    System.out.println((n/top) + 1);
                    System.exit(0);
                }
            }
        }
        System.out.println(1);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = Integer.parseInt(scanner.next()); n Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner int d = Integer.parseInt(scanner.next()); d Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner for(int i = 1; i < n; i++) {
            int bottom = i - d;
            int top = i + d;
            if(bottom == 1) {
                if(n % top == 0) {
                    System.out.println(n/top);
                    System.exit(0);
                } else {
                    System.out.println((n/top) + 1);
                    System.exit(0);
                }
            }
        } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
            int bottom = i - d;
            int top = i + d;
            if(bottom == 1) {
                if(n % top == 0) {
                    System.out.println(n/top);
                    System.exit(0);
                } else {
                    System.out.println((n/top) + 1);
                    System.exit(0);
                }
            }
        } {
            int bottom = i - d;
            int top = i + d;
            if(bottom == 1) {
                if(n % top == 0) {
                    System.out.println(n/top);
                    System.exit(0);
                } else {
                    System.out.println((n/top) + 1);
                    System.exit(0);
                }
            }
        } int bottom = i - d; bottom i - d i d int top = i + d; top i + d i d if(bottom == 1) {
                if(n % top == 0) {
                    System.out.println(n/top);
                    System.exit(0);
                } else {
                    System.out.println((n/top) + 1);
                    System.exit(0);
                }
            } bottom == 1 bottom 1 {
                if(n % top == 0) {
                    System.out.println(n/top);
                    System.exit(0);
                } else {
                    System.out.println((n/top) + 1);
                    System.exit(0);
                }
            } if(n % top == 0) {
                    System.out.println(n/top);
                    System.exit(0);
                } else {
                    System.out.println((n/top) + 1);
                    System.exit(0);
                } n % top == 0 n % top n top 0 {
                    System.out.println(n/top);
                    System.exit(0);
                } System.out.println(n/top) System.out.println System.out System System.out n/top n top System.exit(0) System.exit System 0 {
                    System.out.println((n/top) + 1);
                    System.exit(0);
                } System.out.println((n/top) + 1) System.out.println System.out System System.out (n/top) + 1 (n/top) n top 1 System.exit(0) System.exit System 0 System.out.println(1) System.out.println System.out System System.out 1 String[] args args public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        int n = Integer.parseInt(scanner.next());
        int d = Integer.parseInt(scanner.next());

        for(int i = 1; i < n; i++) {
            int bottom = i - d;
            int top = i + d;
            if(bottom == 1) {
                if(n % top == 0) {
                    System.out.println(n/top);
                    System.exit(0);
                } else {
                    System.out.println((n/top) + 1);
                    System.exit(0);
                }
            }
        }
        System.out.println(1);
    }
} public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        int n = Integer.parseInt(scanner.next());
        int d = Integer.parseInt(scanner.next());

        for(int i = 1; i < n; i++) {
            int bottom = i - d;
            int top = i + d;
            if(bottom == 1) {
                if(n % top == 0) {
                    System.out.println(n/top);
                    System.exit(0);
                } else {
                    System.out.println((n/top) + 1);
                    System.exit(0);
                }
            }
        }
        System.out.println(1);
    }
} Main
import java.util.*;
import java.lang.*;
import java.util.stream.*;

public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        int n = Integer.parseInt(scanner.next());
        int d = Integer.parseInt(scanner.next());

        for(int i = 1; i < n; i++) {
            int bottom = i - d;
            int top = i + d;
            if(bottom == 1) {
                if(n % top == 0) {
                    System.out.println(n/top);
                    System.exit(0);
                } else {
                    System.out.println((n/top) + 1);
                    System.exit(0);
                }
            }
        }
        System.out.println(1);
    }
}
