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())

dd = 2*d + 1

print((n+dd-1) // dd)

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

Solution (Python):

import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(N: int, D: int):
    from math import ceil
    print(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())

d2=d*2+1
result=n/d2
result2=math.ceil(result)

print(result2)

Solution (Python):
import math


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

Solution (Python):
n, d = [int(x) for x in input().split()]

r = (d * 2) + 1

if n % r != 0:
    print(n // r + 1)
else:
    print(n // 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//(2*d+1)
print(ans if n%(2*d+1)==0 else ans+1)

Solution (Python):
x = input().split()
N, D= [int(i) for i in x]
t = 0
while N > 0:
  N -= (2*D+1)
  t += 1
print(t)

Solution (Python):
n,d=map(int,input().split())
cnt=0
nn=1
while True:
  cnt+=1
  nn = nn+d+d
  if nn >= n:
    break
  nn+=1
  
print(cnt)

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

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

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

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

print((N + (D * 2 + 1) - 1) // (D * 2 + 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):

n,d=map(int,input().split())
ans=0
while n>0:
    n=n-(2*d+1)
    ans+=1
print(ans)

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

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

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

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

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

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

Solution (Python):

import math

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

scope = (D * 2) + 1

res = math.ceil(N / scope)

print(res)

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

per=int(n/(2*d+1))+1
if n%(2*d+1)==0:
    per-=1
print(per)

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())
print((2*D+N)//(2*D+1))

Solution (Python):

n,d = map(int,input().split())
ans = 0
dis = 2*d +1

if (n % dis) == 0:
	ans = int(n / dis)
else:
	ans = int((n // dis)+1)

print(ans)

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

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

Solution (Python):
A, B = map(int,input().split())
ans = 0
while A > 0:
    A -= (B*2+1)
    ans += 1
print(ans)

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

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

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

Solution (Python):
N,D = [int(s) for s in input().split()]

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

print(result)

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

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

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

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

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

Solution (Python):
import math
N, D=list(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):
n,d = map(int,input().split())
for i in range(1,n+1):
    if (d*2+1)*i >= n:
        a = i
        break
print(a)

Solution (Python):
N,D = map(int, input().split())
ans = 1
while True:
    if N <= ans*(2*D+1):
        print(ans)
        break
    else:
        ans += 1

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

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

Solution (Python):
import math

def main():
    n, d = map(int, input().split())

    one = 1 + 2 * d

    print(math.ceil(n/one))

if __name__ == '__main__':
    main()

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

Solution (Python):
N,D=map(int,input().split())
cnt=1
while True:
  if cnt*(2*D+1)>=N:
    print(cnt)
    break
  cnt+=1

Solution (Python):
N,D = map(int,input().split())
for i in range(N+1):
    if (2*D+1)*i >= N:
        print(i)
        exit()

Solution (Python):
nd=list(map(int,input().split()))
ans=nd[0]//(2*nd[1]+1)
if nd[0]%(2*nd[1]+1)!=0:
  ans+=1
print(ans)

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())

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

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

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

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

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

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

print(ans)

Solution (Python):
def main():
    import math

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

    
if __name__=="__main__":
    main()

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

Solution (Python):
from math import ceil

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

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

can_watch = D * 2 + 1
member = 0
for s in range(0, N+1):
    if can_watch * int(s) >= N:
        member += s 
        break
print(member)

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

while ((2 * D) + 1) * p < N:
    p += 1

print(p)

Solution (Python):

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

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

for i in range(1,n+1):
  if (2 * d + 1 )* i >= n:
    print(i)
    break

Solution (Python):
import math

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

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

print(ans)

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

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

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

if __name__ == '__main__':
    main()

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

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

canlook=2*d+1

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

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

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

print(ans)

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

Solution (Python):
a=input().split()
N=int(a[0])
D=int(a[1])

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

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

Solution (Python):
n, d = [int(_) for _ in input().split()]

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

Solution (Python):
n, d = [int(_) for _ in input().split()]

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

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

Solution (Python):
a,b = map(int,input().split())
c=2*b+1
i=1
while c*i<a:
    i+=1
else:
    print(i)

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

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

while (2*D+1)*ans < N:
  ans += 1
  
print(ans)

Solution (Python):
import math

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

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


if __name__ == '__main__':
    main()

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

Solution (Python):
import math

N, D = [int(i) for i in 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 math

Arr = input().rstrip().split(' ')
N = int(Arr[0])
D = int(Arr[1])

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

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

Solution (Python):
n, d = map(int, input().split())
a = n % (d*2+1)
if a == 0:
    print(int(n / (d*2+1)))
else:
    print(int(n/(d*2+1)) + 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())
sum1 = d*2+1
ans = n-sum1
cnt=1
while ans > 0:
    ans=ans-sum1
    cnt+=1
print(cnt)

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

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

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

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

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

	if n // area_d == n/area_d:
		print(n//area_d)
	else:
		print(n//area_d + 1)

 
if __name__ == '__main__':
	main()

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

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

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())
i = 1
while True:
    if i*(2*d+1) >= n:
        print(i)
        break
    i += 1

Solution (Python):
N, D = map(int, input().split())
i=1
while True:
  if (2*D+1)*i>=N:
    print(i)
    break
  else:
    i+=1

Solution (Python):
import math

N,D = map(int,input().split())
print(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
A = list(map(int,input().split(" ")))
human = A[1] * 2 + 1
print(math.ceil(A[0] / human))

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

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

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

Solution (Python):
def main():
    N, D = map(int, input().split())
    if (N/((D*2)+1)).is_integer():
        return (N/((D*2)+1))
    else:
        return (N//((D*2)+1)) + 1

if __name__ == '__main__':
    print(int(main()))

Solution (Python):



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


res = N // (2*D + 1) + 1 * (N % (2*D + 1) != 0)


print(res)

Solution (Python):
import math
tree_num, monitor_distance = [int(x) for x  in input().split()]
hitori = monitor_distance*2 + 1
kazu = (tree_num + monitor_distance*2) / hitori
print(int(kazu))

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

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

Solution (Python):
N,D = map(int,input().split())
D = D*2+1
if N%D==0:
    print(N//D)
else:
    print(N//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().strip().split())
t = D * 2 + 1

q, r = divmod(N, t)
print(q + 1 if r > 0 else q)

Solution (Python):
N, D = map(int, input().split())
cnt = 0
while True:
    if N > 0:
        cnt += 1
        N -= 2 * D + 1
    else:
        break

print(cnt)

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

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



while (True):
    if N > 0:
        cnt += 1
        N -= (2 * D + 1)

    else:
        break

print(cnt)

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

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

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

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

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())
r = 2*d+1
if n % r ==0:
  print(n//r)
else:
  print(n//r+1)

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

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

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

for _ in range(n):
    if num*(2*d+1)<n:
        num += 1

print(num)

Solution (Python):
N, D = [int(i) for i in input().split()]

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

Solution (Python):
import sys
import math
def input(): return sys.stdin.readline().rstrip()

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())

ava = d*2 + 1

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

Solution (Python):
(A, B), = [list(map(int, s.split())) for s in open(0)]

p = B*2 + 1
if A % p == 0:
    print(int(A / p))
else:
    print(A // p + 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):
n,s=map(int,input().split())

count=n//(2*s+1)

if n%(2*s+1)==0:
    print(count)
else:
    print(count+1)

Solution (Python):
n, d = [int(x) for x in input().split()]

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

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

cnt = n // (2*d+1)

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

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

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

Solution (Python):
n, d = map(int, input().split())
cnt = 0
sum = 0
while sum < n:
    cnt+=1
    sum+=d*2+1
print(cnt)

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

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

count = 0
while N > 0:
    N -= 2*D+1
    count += 1

print(count)

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

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

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

print(ans)

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

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

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

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

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

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

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

Solution (Python):
N, D = [int(i) for i in input().split()]

q, r = divmod(N, (2*D)+1)

if r == 0:
    print(q)
else :
    print(q+1)

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

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

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())
print((n+d*2)//(d*2+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())
print(math.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):
n, d = map(int, input().split())
print(-(-n//(2*d+1)))

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

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

Solution (Python):
import math

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

ans = n/(1+(d*2))

print(math.ceil(ans))

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

idx = 1
cnt = 0

idx += D
cnt += 1
if idx + D >= N:
    print(cnt)
    exit()
else:
    while idx + D < N:
        idx += ((2 * D) + 1)
        cnt += 1
    print(cnt)

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

Solution (Python):
N, D = (int(x) for x in input().split())
X = N / (2 * D + 1)

if (X.is_integer()):
  print(int(X))
else:
  print(int(X) + 1)

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

tree = list(range(1,N+1))

answer = 0
while tree:
    tree = tree[1+2*D:]
    answer += 1

print(answer)

Solution (Python):
import math

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

wk = d * 2 + 1

ans = math.ceil(n / wk)

print(ans)

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

persons = n/(d*2+1)

if n%(d*2+1) != 0:
    print(int(persons)+1)
    exit()

else:
    print(int(persons))

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

count=0

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

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

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

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

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

Solution (Python):

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

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

Solution (Python):
import sys
N,D = map(int,input().split())
for i in range(N+1):
    if (2*D+1)*i >= N:
        print(i)
        exit()

Solution (Python):
import math

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

ans = math.ceil(n / watch)
print(ans)

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())
ans = 1
a = d+1
if a+d >= n:
    print(ans)
    exit(0)
while(True):
    a += (2*d)+1
    if a > n:
        if a-d-1<n:
            ans+=1
        print(ans)
        exit(0)
    ans+=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())

ans = 0

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

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

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

Solution (Python):
def golden_apple(N: int, D: int)->int:
    ans = N // (2*D+1)
    if N % (2*D+1):
        ans += 1
    return ans


if __name__ == "__main__":
    N, D = map(int, input().split())
    ans = golden_apple(N, D)
    print(ans)

Solution (Python):
N, D = map(int, input().split())
ans = 0
checked = 0
while True:
    checked += (1 + 2* D)
    ans += 1
    if checked >= N:
        break
print(ans)

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
import math

if sys.platform =='ios':
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return [int(s) for s in input().split()]

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

Solution (Python):
n,a=map(int,input().split())
c=0
while True:
    n=n-(a*2+1)
    c+=1
    if n<=0:
        print(c)
        exit()

Solution (Python):
N,D = map(int,input().split())
if N%(2*D+1) != 0:
    print(int(N//(2*D + 1)+1))
else:
    print(int(N//(2*D + 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+1)))

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

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

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

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

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

Solution (Python):

import math

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

n = N / (1 + 2 * D)

result = math.ceil(n)
print(result)

Solution (Python):
n, d = (int(i) for i in input().split())
p = d * 2 + 1
cnt = 0
while (n > 0):
    n -= p
    cnt += 1

print(cnt)

Solution (Python):
import sys

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

while True:
    if((2*D+1)*count>=N):
        print(count)
        sys.exit()
    count+=1

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

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

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

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

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

if (a[0]%(1+a[1]*2)) ==0:
    print(int(a[0]/(1+a[1]*2)))
else:
  print((a[0]//(1+a[1]*2))+1)

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

Solution (Python):
import math

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

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

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

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

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

print(ans)

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

Solution (Python):
N,D = map(int,input().split())
sr = int(2*D+1) 
count = int(0)
for i in range(N):
    if 0 < N:
        N -= sr
        count += 1
print(count)

Solution (Python):
import math

l=list(map(int,input().split()))
n=l[0]
d=l[1]
print(math.ceil(n/(2*d+1)))

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

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

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

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

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

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

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

Solution (Python):


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

temp=2*D+1

print(-(-N//temp))

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

Solution (Python):
n,d=map(int,input().split())
for i in range(1,8):
  if i*(2*d+1)>=n:
    print(i)
    exit()

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

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

Solution (Python):
import math
list1=input().split()
s=int(list1[0])/(1+2*int(list1[1]))
print(math.ceil(s))

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

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

n = nd[0]
d = nd[1]

ans = int(n/(2*d+1))

if n%(2*d+1) != 0:
	ans += 1

print(ans)

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())
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())
print(-(-n//(2*d+1)))

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

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

Solution (Python):
import math
N, D = [int(x) for x in input().split()]

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

Solution (Python):
import math


def main():
    N, D = map(int, input().split())

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


if __name__ == '__main__':
    main()

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

ans = 0

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

print(ans)

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

count = 1 

while (count * (D * 2 + 1)) < N:
  count += 1

print(count)

Solution (Python):
import math

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

aaa = (D*2)+1

print(math.ceil(N/aaa))

Solution (Python):
A=list(map(int,input().split()))
for i in range(20):
    if (A[1]*2+1)*i<A[0]:
        continue
    else:
        ans=i
        break
print(ans)

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

if int(N / (2*D+1)) < N/(2*D+1):
  ans = int(N / (2*D+1) +1)
else:
  ans = int(N / (2*D+1))
  
print(ans)

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

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

Solution (Python):

n, d = [int(s) for s in input().split()]
print(n // (d * 2 + 1) if n % (d * 2 + 1) == 0 else n // (d * 2 + 1) + 1)

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

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

Solution (Python):
n, d=input().split()
ni=int(n)
di=int(d)
cnt=1
while True:
  if (2*di+1)*cnt>=ni:
    print(cnt)
    break
  
  cnt+=1

Solution (Python):
N,D = map(int,input().split(' '))
d = D*2+1
for i in range(1,20):
    if N <= d*i:
        print(i)
        exit()

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

ans = int(ans)
print(ans)

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

print(int(ans))

Solution (Python):

import sys

import math








def main():
    n, d = [int(x) for x in sys.stdin.readline().split()]
    ran = 1 + d * 2
    number = math.ceil(n / ran)
    print(number)

if __name__ == "__main__":
    main()

Solution (Python):
N,D = (int(i) for i in input().split())

count = 0
range = 2*D + 1

while True:
	N = N - range
	count += 1
	if N < 1:
		break

print(count)

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


[n, d] = inpl()

print(n//(2*d+1)+(n%(2*d+1)>0))

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

i = 0
while True:
    i += 1
    if (i * D * 2) + (i) >= N:
        break

print(i)

Solution (Python):
"""
author : halo2halo
date : 13,Nov,2019
"""

import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

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

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

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

observers = 0

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

print(observers)

Solution (Python):
import sys
input = sys.stdin.readline
import math
def print_ans(N, D):
    """Test Case
    >>> print_ans(6, 2)
    2
    >>> print_ans(14, 3)
    2
    >>> print_ans(20, 4)
    3
    """
    print(math.ceil(N / (D * 2 + 1)))
    

if __name__ == '__main__':
    N, D = map(int,input().rstrip().split())
    print_ans(N, D)

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

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(" "))
a=n%(2*d+1)
if a == 0:
    print(n//(2*d+1))
else:
    print(n//(2*d+1)+1)

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

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

for i in range(1,11):
    N -= (2*D+1)
    if N <= 0:
        print(i)
        break

Solution (Python):
n, d = map(int, input().split())
if n % (d*2 + 1) == 0:
    print(int(n / (d*2 + 1)))
else:
    print(int(n // (d*2 + 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*2+1)))

Solution (Python):

import sys
def input():
    return sys.stdin.readline().rstrip()

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


if __name__ == '__main__':
    main()

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

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):
n,p=map(int,input().split())
if n%(2*p+1)==0:
    print(n//(2*p+1))
else:
    print(n//(2*p+1)+1)

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