Problem:
 Score : 200 points    Problem Statement There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i -th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.      Constraints  All values in input are integers.  1 \leq N \leq 20  1 \leq D \leq 20         Input Input is given from Standard Input in the following format:  N  D       Output Print the minimum number of inspectors that we need to deploy to achieve the objective.        Sample Input 1 6 2      Sample Output 1 2  We can achieve the objective by, for example, placing an inspector under Tree 3 and Tree 4 .       Sample Input 2 14 3      Sample Output 2 2       Sample Input 3 20 4      Sample Output 3 3

Solution (Python):
n, d = map(int, input().split())
print((n + 2 * d)//(2 * d + 1))

Solution (Python):
n, d = map(int, input().split())
print((n-1) // (2*d+1) + 1)

Solution (Python):
from math import ceil

N,D=map(int,input().split())
print(ceil(N/(2*D+1)))

Solution (Python):
n,d=map(int,input().split())
print(-((-n)//(2*d+1)))

Solution (Python):
from math import ceil
N, D = map(int, input().split())
M = 2 * D + 1
print(ceil(N/M))

Solution (Python):
import math
n,d=map(int,input().split())
print(math.ceil(n/(2*d+1)))

Solution (Python):
n, d = map(int, input().split())

print((n - 1) // (d * 2 + 1) + 1)

Solution (Python):
N, D = map(int, input().split())
D_re = D*2 + 1
print(-(-N//D_re))

Solution (Python):
N,D = (int(x) for x in input().split())
d21 = 2*D+1
ans = N//d21
if N%d21 != 0:
    ans += 1

print(ans)

Solution (Python):
N, D = map(int, input().split())
print((N - 1) // (2 * D + 1) + 1)

Solution (Python):
import math
def Solve():
    N,D=[int(x) for x in input().split()]
    return math.ceil(N/(D*2+1))
print(Solve())

Solution (Python):
from math import *
def solve():
    n, d = map(int, input().split())
    print(ceil(n / (2 * d + 1)))
solve()

Solution (Python):
N,D = map(int,input().split())
ans = -(-N//(2*D+1))
print(ans)

Solution (Python):
n, d = map(int, input().split())
print(-(-n // (d * 2 + 1)))

Solution (Python):
n,d=map(int,input().split())
if n%(2*d+1)==0:
    s=0
else:
    s=1
print(n//(2*d+1)+s)

Solution (Python):
import math
n,d=map(int,input().split())
ans=math.ceil(n/(2*d+1))
print(ans)

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007


def A():
    n = I()
    print(3*n**2)
    return


def B():
    n,d = LI()
    f = [1]*(n+2*d+2)
    ans = 0
    for i in range(n):
        if f[i]:
            for j in range(i,i+2*d+1):
                f[j] = 0
            ans += 1
    print(ans)
    return


def C():
    n = I()

    return


def D():
    n = I()

    return


def E():
    n = I()

    return


def F():
    n = I()

    return


if __name__ == "__main__":
    B()

Solution (Python):
a, b = map(int, input().split())
b1 = 2*b+1
ans = 0
if(a % b1 == 0):
    ans = a // b1
else:
    ans = a //b1 + 1
print(ans)

Solution (Python):
import math
N, D = map(int, input().split())
print(math.ceil(N/(2*D+1)))

Solution (Python):
import sys

inf = 10 ** 18
P = 10 ** 9 + 7

N, D = map(int, input().split())

for i in range(20):
    if i * (1 + 2 * D) >= N:
        break

print(i)

Solution (Python):
n, d = (int(i) for i in input().split())
ans = n // (2*d + 1)
if n  % (2*d + 1) != 0:
    ans += 1
print(ans)

Solution (Python):
n, d = map(int, input().split())
capa = 2 * d + 1
if n % capa == 0:
    print(n // capa)
else:
    print(n // capa + 1)

Solution (Python):
from math import ceil

n, d = map(int, input().split())

print(ceil(n / (d * 2 + 1)))

Solution (Python):
n,d=map(int,input().split())
print(-(-n//(d*2+1)))

Solution (Python):
import math
n, d = input().split()
n = int(n)
d = int(d)

print(math.ceil(n / (2*d + 1)))

Solution (Python):
n,d = map(int,input().split())
ans = n // (2 * d + 1)
if  n % (2 * d + 1) != 0:
    ans += 1
print(ans)

Solution (Python):
import math

n, d = map(int, input().split())
hitori=2*d+1
print(math.ceil(n/hitori))

Solution (Python):
n, d = map(int, input().split())
ans = -int(-n // (2*d+1))
print(ans)

Solution (Python):
n, d = map(int, input().split())
dd = 2*d+1
print((n+dd-1)//dd)

Solution (Python):


n,d = map(int,input().split())

a = n // (2 * d + 1)
if n % (2 * d + 1) != 0:
    a += 1
print(a)

Solution (Python):
n,d = map(int,input().split())

if n % (2*d+1)==0:
    print(n//(2*d+1))
else:
    print((n//(2*d+1))+1)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, D = MAP()

if N % (2*D+1) == 0:
	print(N//(2*D+1))
else:
	print(N//(2*D+1)+1)

Solution (Python):
import sys

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

def main():
    N, D = MAP()
    if N%(2* D + 1)>0:
        print(N//(2* D + 1)+1)
    else:
        print(N//(2* D+ 1))

if __name__ == '__main__':
    main()

Solution (Python):
N, D = map(int, input().split())
W = D * 2 + 1
print((N - 1) // W + 1)

Solution (Python):
import math
N, D = map(int, input().split())
print(math.ceil(N / (1 + 2 * D)))

Solution (Python):
N, D = map(int, input().split())

from math import ceil
print(ceil(N / (2*D + 1)))

Solution (Python):
import math
N,D = map(int,input().split())
print(math.ceil(N/(D*2+1)))

Solution (Python):
n, d = map(int, input().split())

r = 2 * d + 1
if n % r == 0:
    print(n // r)
else:
    print(n // r + 1)

Solution (Python):
import math
n,d =  list(map(int,input().split(" ")))

temp = d * 2 + 1

print(  math.ceil(n/temp))

Solution (Python):
import math
n,d = list(map(int,input().split()))
print(math.ceil(n/(d*2+1)))

Solution (Python):
N, D = map(int, input().split())
count = 1
pos = 2*D+1
while(pos < N):
    pos += 2*D+1
    count += 1
print(count)

Solution (Python):
n,d = map(int,input().split())
m = 2*d+1
print((n-1)//m + 1)

Solution (Python):
N, D = list(map(int, input().split()))

X = D*2 + 1
print((N+(X-1))//X)

Solution (Python):
n,d=map(int,input().split())
r=2*d+1
print((n//r)+1 if n%r!=0 else n//r)

Solution (Python):
import math
N, D = map(int, input().split())
ob_range = 2 * D + 1
print(math.ceil(N / ob_range))

Solution (Python):
import math
N,M=list(map(int,input().split()))
print(int(math.ceil(N/(M*2+1))))

Solution (Python):
N, D = list(map(int, input().split()))

d = 1 + D * 2
if N % d == 0:
    print(N // d)
else:
    print(N // d + 1)

Solution (Python):
N, D = map(int, raw_input().split())
t = 2*D+1
print (N+t-1)/t

Solution (Python):
from math import ceil
N, D = map(int, input().split())
print(ceil(N / (2 * D + 1)))

Solution (Python):
import sys
import math
input = sys.stdin.readline

def main():
    N, D = map(int, input().split())
    print(math.ceil(N / (2 * D + 1)))


if __name__ == "__main__":
    main()

Solution (Python):
n,d = map(int,input().split())
from math import ceil
print(ceil(n/(2*d+1)))

Solution (Python):
def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]





N, D = map(int, input().split())
a = D * 2 + 1
ans = (N + a-1) // a
print(ans)

Solution (Python):

n, d = map(int, input().split())
print((n + 2 * d) // (2 * d + 1))

Solution (Python):
from fractions import gcd
import math


def inverse(a):
    return pow(a, mod - 2, mod)


def usearch(x, a):
    lft = 0
    rgt = len(a) + 1
    while rgt - lft > 1:
        mid = (rgt + lft) // 2
        if a[mid] <= x:
            lft = mid
        else:
            rgt = mid
    return lft


def main():
    n, d = map(int, input().split())
    d = 2 * d + 1
    print(n // d + (1 if n % d else 0))

main()

Solution (Python):
a,b = map(int,input().split())
n = 2*b + 1
ans = a // n
if a % n != 0:
    ans += 1
print(ans)

Solution (Python):

n,d = map(int,input().split())
ans = n//(d*2+1)
if n%(d*2+1)!=0:
    ans += 1
print(ans)

Solution (Python):

import sys
import math

def solve(N: int, D: int):
    print(math.ceil(N / (2 * D + 1)))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    D = int(next(tokens))  
    solve(N, D)

if __name__ == '__main__':
    main()

Solution (Python):
import math
n, d = map(int, input().split())

print(math.ceil(n / (d * 2 + 1)))

Solution (Python):
N, D = map(int, input().split())
print(-(-N // (2 * D + 1)))

Solution (Python):

import copy
import random
import bisect 
import fractions 
import math
import sys

mod = 10**9+7
sys.setrecursionlimit(mod) 

def LI(): return list(map(int, sys.stdin.readline().split()))

N,D = LI()
ans = math.ceil(N/(D*2+1))
print(ans)

Solution (Python):
a, b = map(int, input().split())
c = b * 2 +1
if a % c == 0:
    print(a // c)
else:
    print(a // c + 1)

Solution (Python):




import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop
import math

def main():
    n, d = map(int, input().split())
    area = d * 2 + 1
    print(math.ceil(n/area))

if __name__ == '__main__':
    main()

Solution (Python):
n, d = map(int, input().split())
import math
print(math.ceil(n/(2*d+1)))

Solution (Python):
from math import ceil
N,D=map(int,input().split())
print(int(ceil(N/(2*D+1))))

Solution (Python):
from math import ceil
N, D = map(int, input().split())
print(ceil(N / (2 * D + 1)))

Solution (Python):
a,b = map(int,input().split())
l = 1+2*b
if a%l == 0:
  print(a//l)
else:
  print(a//l+1)

Solution (Python):
N, D = map(int, input().split())

for i in range(100):
    if N <= (2*D+1)*i:
        print(i)
        break

Solution (Python):
from math import ceil
n, d = map(int, input().split())
print(ceil(n/(d*2+1)))

Solution (Python):
import math
n,d=map(int,input().split())
print(math.ceil(n/(2*d+1)))

Solution (Python):
N, D = map(int, input().split())
print ((N + 2 * D)//(2 *D + 1))

Solution (Python):
N, D = map(int, input().split())
print((N-1)//(2*D+1)+1)

Solution (Python):
N, D = list(map(int,input().split()))
import math
print( math.ceil(N / (2*D+1)))

Solution (Python):
a, b = map(int, raw_input().split())
b = b * 2 + 1
print (a + b - 1) // b

Solution (Python):
n, d = map(int, input().split())

x = 2 * d + 1

print(-(-n // x))

Solution (Python):



import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline 

n,d = [int(i) for i in readline().split()]

print((n+2*d)//(2*d+1))

Solution (Python):
N, D = map(int, input().split())
a = 2 * D + 1
print((N + a - 1) // a)

Solution (Python):
import math
n, d = [int(item) for item in input().split()]
print(math.ceil(n / (d*2+1)))

Solution (Python):
if __name__ == '__main__':
    n, d = map(int, input().split())
    print((n - 1) // (2 * d + 1) + 1)

Solution (Python):
import math
N, D = map(int, input().split())
d2 = D * 2 + 1
print(math.ceil(N / d2))

Solution (Python):
from math import ceil
N, D= map(int,input().split())
print(ceil(N/(2*D+1)))

Solution (Python):
n, d = list(map(int, input().split()))
if n%(2*d+1):
  print(n//(2*d+1)+1)
else:
  print(n//(2*d+1))

Solution (Python):
N, D = map(int, input().split())


res = N // (2*D+1)

if N%(2*D+1) != 0:
    res += 1
    
print(res)

Solution (Python):
n,d=map(int,input().split())
D=2*d+1
if n%D==0:
    print(n//D)
else:
    print(n//D+1)

Solution (Python):
N, D = map(int, input().split())

R = N // (2 * D + 1)

if N % (2 * D + 1) != 0:
    R += 1

print(R)

Solution (Python):
N, D = map(int, input().split())

print((N+2*D) // (2*D+1))

Solution (Python):
import math
[n,d] = [int(i) for i in input().split()]
print(math.ceil(n / (2*d+1)))

Solution (Python):
from math import ceil

N, D = [int(elem) for elem in input().split()]
num_trees_per_person = 2 * D + 1

print(ceil(N / num_trees_per_person))

Solution (Python):
import math
n, d = map(int, input().split())
print(math.ceil(n / (2 * d + 1)))

Solution (Python):
n, d = map(int, input().split())

tmp = d*2 + 1
ans = -((-n) // tmp)
print(ans)

Solution (Python):
def main():
    n, d = map(int, raw_input().split())
    d = 2 * d + 1
    print (n + d - 1) // d


if __name__ == '__main__':
    main()

Solution (Python):
import math
N, D = map(int, input().split())
print(math.ceil(N/(D*2+1)))

Solution (Python):
n,r = map(int,input().split())
r = 2 * r + 1
ans = n // r 
if n % r != 0:
  ans += 1
print(ans)

Solution (Python):
N, D = map(int, input().split())
i = 0
num = 0
while i < N:
    i += 2 * D + 1
    num += 1
print(num)

Solution (Python):
n,d=map(int,input().split())

print((n-1)//(2*d+1)+1)

Solution (Python):
N,D=map(int,input().split())
print((N-1)//(2*D+1)+1)

Solution (Python):
import math
n, d = list(map(int, input().split()))
print(math.ceil(n / (2 * d + 1)))

Solution (Python):
import math

N,D = map(int,input().split())

r = math.ceil(N/(1+2*D))

print(r)

Solution (Python):

N ,D = map(int,input().split())


if N % (2*D+1) == 0:

    print (N // (2*D+1))

else:

    print (N // (2*D+1) + 1)

Solution (Python):
n, d = map(int, input().split())
ans = (n + d + d) // (d+d+1)
print(ans)

Solution (Python):
from math import ceil

N, D = map(int, input().split())

ans = ceil(N / (2 * D + 1))
print(ans)

Solution (Python):
import math

def solve():
  N, D = map(int, input().split())
  return math.ceil(N / (D * 2 + 1))

print(solve())

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
def MI():
    return map(int,input().split())
def I():
    return int(input())
def LI():
    return [int(i) for i in input().split()]

n,d=MI()
l=2*d+1
ans=(n+l-1)//l

print(ans)

Solution (Python):
def main():
  n, d = map(int, input().split())
  print((n+2*d) // (2*d+1))


if __name__ == '__main__':
  main()

Solution (Python):
import sys
s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in ss]
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2sss = lambda n: [list(sys.stdin.readline().rstrip()) for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

import math

def main():
    N, D = i2nn()
    n = int(math.ceil(N / (2*D+1)))
    print(n)

main()

Solution (Python):
n, d = list(map(int, input().split()))
d = d * 2 + 1
a = n // d
if a * d < n:
  a += 1
print(a)

Solution (Python):






N, D = [int(n) for n in input().split()]






D *= 2
D += 1
ans = 0
while(N>0):
    N-= D
    ans+=1
print(ans)

Solution (Python):
N, D = map(int, input().split())

ans = -(-N // (2*D+1))
print(ans)

Solution (Python):
n,d=map(int,input().split())
print((n+2*d)//(2*d+1))

Solution (Python):
import bisect
import heapq
import itertools
import math
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7




N, D = list(map(int, sys.stdin.readline().split()))

print(math.ceil(N / (D * 2 + 1)))

Solution (Python):

from __future__ import division, print_function

import os
import sys
from __builtin__ import xrange as range
from cStringIO import StringIO
from future_builtins import ascii, filter, hex, map, oct, zip
from io import IOBase

import __pypy__


def main():
    n, d = map(int, input().split())
    x = 2 * d + 1
    if n % x == 0:
        print(n // x)
    else:
        print((n // x) + 1)




BUFSIZE = 8192


class FastI(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = StringIO()
        self.newlines = 0

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count("\n") + (not b)
            ptr = self._buffer.tell()
            self._buffer.seek(0, 2), self._buffer.write(b), self._buffer.seek(ptr)
        self.newlines -= 1
        return self._buffer.readline()


class FastO(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = __pypy__.builders.StringBuilder()
        self.write = lambda s: self._buffer.append(s)

    def flush(self):
        os.write(self._fd, self._buffer.build())
        self._buffer = __pypy__.builders.StringBuilder()


def print(*args, **kwargs):
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


sys.stdin, sys.stdout = FastI(sys.stdin), FastO(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")



if __name__ == "__main__":
    main()

Solution (Python):
import math

N, D = map(int, input().split())
print(int(math.ceil(N / (2 * D + 1))))

Solution (Python):

import math
n, d = map(int, input().split())
print(math.ceil(n / (2*d+1)))

Solution (Python):
import math
n, d = [int(v) for v in input().split()]
print(math.ceil(n/(2*d+1)))

Solution (Python):
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

n, d = li()

print(-(-n // (2*d + 1) ))

Solution (Python):
n, d = map(int, input().split())
print(n//(2*d+1)+(n%(2*d+1)>0))

Solution (Python):
N,D=map(int,input().split())
X=2*D+1
print(-((-N)//X))

Solution (Python):
n, d = map(int, input().split())
print((n - 1) // (2 * d + 1) + 1)

Solution (Python):
def main():
    N, D = map(int, input().split())
    w = D * 2 + 1
    ans = -(-N//w)
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):

import sys


import numpy as np

import itertools

"""Template"""


class IP:
    """
    入力を取得するクラス
    """
    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        
        
        
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x//y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)

    def gcd(self, x, y):
        if y == 0:
            return x
        else:
            return self.gcd(y, x % y)

    def lcm(self, x, y):
        return (x * y) // self.gcd(x, y)


"""ここからメインコード"""


def main():
    
    r, e = range, enumerate
    ip = IP()
    id = Idea()
    """この下から書いてね"""
    n, d = ip.IL()
    print(id.ceil(n, (2 * d + 1)))


main()

Solution (Python):
n, k = input().split()
n, k = int(n), int(k)

k = 2 * k + 1

c = n % k

if c == 0:
  print(n // k)
else:
  print(n // k + 1)

Solution (Python):
n,k=map(int,input().split())
d=1+k*2
print((n+d-1)//d)

Solution (Python):
from math import ceil
n, d = map(int, input().split())
print(ceil(n / (2 * d + 1)))

Solution (Python):
import numpy as np

n,d = map(int,input().split())

a = d*2+1


if n%a == 0:
    print(n//a)
else:
    print(n//a+1)

Solution (Python):
N, D = map(int, input().split())

ans = 0

while N > 0:
    N -= D + 1 + D
    ans += 1

print(ans)

Solution (Python):
N, D = [int(i) for i in input().split()]
d = 1 + 2 * D

print(-(-N // d))

Solution (Python):
import math
N, D = map(int, input().split())
print(math.ceil(N / (2 * D + 1)))

Solution (Python):
n,d = map(int,input().split())
if n%(2*d+1)==0:
    print(n//(2*d+1))
else:
    print(n//(2*d+1)+1)

Solution (Python):

import sys
INF = float("inf")


def solve(N: int, D: int):
    print(-(-N//(2*D+1)))
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    D = int(next(tokens))  
    solve(N, D)


if __name__ == '__main__':
    main()

Solution (Python):
N,D = map(int,input().split())
D = 2*D+1
if N%D==0:
    print(N//D)
else:
    print(N//D+1)

Solution (Python):
N,D = map(int,input().split())
d = 2*D+1
print(-(-N//d))

Solution (Python):
N, D = map(int,input().split())

a = 2*D+1

print(N//a + (N % a != 0))

Solution (Python):
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(input())
def inpl(): return list(map(int, input().split()))
def inpl_str(): return list(input().split())

N,D = inpl()
print((N-1)//(D*2+1)+1)

Solution (Python):
n, d = map(int, input().split())
a = 2*d+1
ans = -(-n//a)
print(ans)

Solution (Python):
a,b=map(int,input().split())
print((a-1)//(2*b+1)+1)

Solution (Python):
n,d = map(int,input().split())
print((n + 2 * d) // (2 * d + 1))

Solution (Python):
N, D = map(int, input().split())
print(-(-N//(D+D+1)))

Solution (Python):
N, D = map(int, input().split())
print(-int(-N//(2*D+1)))