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())
look_around = D*2 + 1
if N%look_around == 0:
    print(N//look_around)
else:
    print(N//look_around + 1)

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

Solution (Python):

import numpy as np
import math
import copy
import re
import sys


inf = float("inf")
prime = 1

def check_print(check_flag, text, end="\n"):
  if check_flag:
    print(text, end=end)

def c2i(x):
    if str.isdecimal(x):
        return int(x)
    else:
        return x

def cout(*args):
  arglist = []
  for arg in args:
    if hasattr(arg, "__iter__"):
      arglist.extend(arg)
    else:
      arglist.append(arg)
      
  arglist = list(map(str, arglist))
  print(" ".join(arglist))
  
def count2(num):
  count=0
  while num%2==0:
    num/=2
    count+=1
  return count

def ketasum(num):
  nums = [int(s) for s in str(num)]
  return sum(nums)


def gcd(a, b): 
  while b:
    a, b = b, a % b
  return a

def lcm(a, b): 
  return a * b // gcd (a, b)

def gcd3(lis): 
  ans = lis[0]
  for li in lis:
    ans = gcd(ans,li)

def lcm3(lis): 
  ans = lis[0]
  for li in lis:
    ans = lcm(ans,li)

def divisor(n): 
  i = 1
  table = []
  while i * i <= n:
    if n%i == 0:
      table.append(i)
      table.append(n//i)
    i += 1
  table = list(set(table))
  return table

def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(i)
    i += 1
  if n > 1:
    table.append(n)
  return table

def is_prime(n):
  for i in range(2, n + 1):
    if i * i > n:
      break
    if n % i == 0:
      return False
  return n != 1


"""
n = int(input())


a = map(int, input().split())
a,b = map(int, input().split())

d=[]
for i in range(n):
  d[i]=int(input())


a = [list(map(int, input().split())) for i in range(n)]

s = input()
ss =  [int(si) for si in s]
"""


"""
a = sorted(a)
a = sorted(a, reverse=True)

"""


"""
pattern = ""
result = re.search(pattern, s)

result = re.fullmatch(pattern, s)

result = re.finditer(pattern, s)
for res in result:
    print res.group()   
    print res.start()   
    print res.end()     
    print res.span()    
"""



"""

math.floor()

math.ceil()
"""


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

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

res = 0
count = 0
while  count < N:
    count += 2 * D + 1
    res += 1

print(res)

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

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

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

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 sys


def solve(N: int, D: int):
    supervize = 1 + 2 * D
    if N % supervize:
        print(N // supervize + 1)
    else:
        print(N // supervize)
    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())
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 // (1+2*d)))

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

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

Solution (Python):
import math

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

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

print(result)

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

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

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

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):
a = list(map(int,input().split()))
b=a[0]//(a[1]*2+1)
if a[0]%(a[1]*2+1) == 0:
    pass
else:
    b+=1
print(b)

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

Solution (Python):
import math





inputa = input().split()


a = int(inputa[0])
b = int(inputa[1])


















ans = math.ceil(a / (2*b + 1))
print(int(ans))

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

Solution (Python):
import math 
N,ability=map(int,input().split())
can_see=2*ability+1

Q=math.ceil(N/can_see)
print(Q)

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

r = N 
i = 0

"""
for k in range(50):
    r = r - (2 * D + 1)
    print("r = ", r)
    if r < (2 * D + 1):

        break
"""
a = N // (2*D+1)

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

Solution (Python):
a,b = [ int(i) for i in input().split()]
print(-(-a//(2*b +1)))

Solution (Python):
def main():
	N, D = map(int, input().split())
	ans, mod = divmod(N, 2*D+1)
	if mod != 0:
		ans += 1
	print(ans)


if __name__ == '__main__':
	main()

Solution (Python):
import math

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

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

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

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

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

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

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

if __name__ == "__main__":
    B_GoldenApple()

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

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

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

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

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

cnt=0
while True:
  if n <= (2*d+1)*cnt:
    break
  cnt += 1
print(cnt)

Solution (Python):
N,D=map(int,input().split())
range=2*D+1
people=0
while N-range>0:
  people+=1
  N=N-range
else:
  people+=1
  print(people)

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

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

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

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

print(ans)

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

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

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

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

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

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

Solution (Python):
N, D = map(int, input().split())
print((N - 1) // (2 * D + 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 = list(map(int,input().split()))
import math
print(math.ceil(n/(d * 2 + 1)))

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


if __name__ == '__main__':
    p_b()

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):
num=input().split()
N=int(num[0])
D=int(num[1])
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(int(N//(2*D+1)))
else:
  print(int(N//(2*D+1)+1))

Solution (Python):
num = [int(i) for i in input().split()]
n = num[0]
d = num[1]

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

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

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

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

Solution (Python):

I = input()

N = int(I.split()[0])
D = int(I.split()[1])

d = 1+2*D

if N%d == 0:
    print(int(N/d))
else:
    print(int((N//d)+1))

Solution (Python):
nd = map(int, raw_input().split())
print(int(-(-nd[0]/(2*nd[1]+1))))

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

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

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

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

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

Solution (Python):
def main():
    N, D = map(int, input().split())
    r = N % (2*D+1)
    m = N // (2*D+1)
    if r != 0: m +=1

    return m


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

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


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

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

result = N // (2 * D + 1)
rest = N % (2 * D + 1)

if rest != 0:
  result += 1
  
print(result)

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

Solution (Python):



from math import ceil

def main():
  number_of_tree, monitering_range = map(int, input().split())
  monitering_range = monitering_range*2 + 1
  number_for_monitor = ceil(number_of_tree / monitering_range)
  print(number_for_monitor)
  pass

if __name__=='__main__':
  main()

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

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

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

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

r = 2*d + 1

ans = math.ceil(n/r)

print(ans)

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

Solution (Python):
List = list(map(int,input().split()))
N = List[0]
D = List[1]
L = 2 * D + 1
count = 1
while N - L > 0:
    count += 1
    N = N - L
print(count)

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

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

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

if a == 0 :
    print(ans)
else:
    print(ans+1)

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


q = n // (2*d+1)
r = n % (2*d+1)

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

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

x=1



while (2*d+1)*x<n :
    x+=1
else:
    print(x)

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

c = 0

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

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

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

n = i[1]*2 + 1

a = i[0] / n

if i[0] % n != 0:
    a = a + 1

print(int(a))

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

Solution (Python):

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

n_see = d*2+1

print(math.ceil(n/n_see))

Solution (Python):
def solve(string):
    n, d = map(int, string.split())
    return str((n - 1) // (2 * d + 1) + 1)


if __name__ == '__main__':
    print(solve(input()))

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

for i in range(100):
    if n <= (1+d*2)*i:
        print(i)
        exit()

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())
result = 1
rang = D*2+1

while rang < N:
    result += 1
    rang += D*2+1 

print(result)

Solution (Python):

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


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

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):
a, b = map(int, input().split())
 
q, mod = divmod(a, 2*b+1)
 
print(q) if mod == 0 else print(q+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())
import math
print(math.ceil(n/(2*d+1)))

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

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

print (math.ceil(N/(2*D+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())
print(int(N//(2*D+1.001) + 1))

Solution (Python):
import math

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

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

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

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

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

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

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

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

print(ans)

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

for i in range(n):
    if n<d:
        print(1)
        break
    else:
        a = n- i*(2*d+1)
        if a<=0:
            print(i)
            break

Solution (Python):
import math

nd = [int(x) for x in input().strip().split()]
n = nd[0]
d = nd[1]

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

Solution (Python):
from math import *

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

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

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

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

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

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

ans = N/(2*D+1)

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

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

x=N/(2*D+1)

if  int(x)==x:
    output=x
    output=int(x)
else :
    output=int(x)+1

print(output)

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

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


if __name__ == '__main__':
  main()

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

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


if __name__ == "__main__":
    print(solve())

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

hani = d*2 + 1

ans = int(n/hani)

if(ans - (n/hani) < 0):
  ans += 1

print(ans)

Solution (Python):
import math


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

Solution (Python):
import math

inp = list(map(int, input().strip().split(' ')))

a = inp[0]
b = inp[1]

r = b * 2 + 1
m = math.ceil(a / r)
print(m)

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

Solution (Python):


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

x = 0
while(True):
    n -= d * 2 + 1
    x += 1
    if n <= 0:
        break
        
print(x)

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

Solution (Python):


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

Solution (Python):

import math

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

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

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

o1 = ((i1[0]) // (i1[1]*2 + 1))
o2 = ((i1[0]) % (i1[1]*2 + 1))
if o2 == 0:
    print(o1)
else:
    print(o1 + 1)

Solution (Python):
import math
a,b = map(int,input().split())

print(math.ceil(a / (2*b+1)) )

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

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

if num_y != 0:
  print(num_x+1)
else:
  print(num_x)

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

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

Solution (Python):
s = input().split()
n = int(s[0])
d = int(s[1])
drange = d * 2 + 1
num = 0
for i in range(10):
  num += 1
  n -= drange
  if n <= 0:
    print(num)
    break

Solution (Python):
def main():
  n, d = map(int, input().split(' '))
  p = d * 2 + 1
  for i in range(1, n + 1):
    if n / (i * p) <= 1:
      print(i)
      break


if __name__ == '__main__':
  main()

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

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

Solution (Python):
n, d = map(int, input().split())
q, m = divmod(n,d*2+1)
print(q + (m!=0))

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())
avility = (2 * D + 1)

z = -( (-1 * N) // avility)
print(z)

Solution (Python):
def abc_134(N, D):
    gurad_cnt = 1
    range = D * 2 + 1
    while 1:
        if N <= range * gurad_cnt:
            break
        else:
            gurad_cnt += 1

    print(gurad_cnt)


if __name__ == "__main__":
    N, D = [int(i) for i in input().split()]
    abc_134(N, D)

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())
avility = (2 * D + 1)

if N % avility == 0:
    print((N // avility))
else:
    print((N // avility)+1)

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

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

print(ans)

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

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

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

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

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

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

Solution (Python):
import math

a=input()

n,d = a.split()
n= float(n)
d =float(d)

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

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

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

Solution (Python):
import math

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

d_look = 2 * d + 1

print(math.ceil(n/d_look))

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 math
N,D=map(int,input().split())
cover=2*D+1
ans=math.ceil(N/cover)
print(ans)

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

people = N / (2*D+1)
if people % 1.0 != 0:
    people+=1
print(int(people))

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

Solution (Python):
n,d = (int(x) for x in 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 % (d * 2 + 1) == 0:
        print(n // (d * 2 + 1))
else:
        print(n // (d * 2 + 1) + 1)

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

unit=2*width+1

print((treenum-1)//unit+1)

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

Solution (Python):
P = [int(_) for _ in input().split()]
N = P[0]
D = P[1]

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

Solution (Python):
"""


 = sys.stdin.readline().rstrip()
 = list(sys.stdin.readline().rstrip())


 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  


a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654


char_list = list("abcd") 
"""

import math
import sys
import itertools
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

mod = 1000000007

if __name__ == "__main__":

    N, D = map(int, sys.stdin.readline().split())
    r = 2*D + 1
    if N % r == 0:
        print(int(N / r))
    else:
        print(int(N / r) + 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())

a = N % (2*D+1)

if a == 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())
a = N / (2 * D + 1)
if N % (2 * D + 1) == 0:
    print(int(a))
else:
    print(int(a) + 1)

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

Solution (Python):

A = list(map(int,input().split()))

judge = 0
remain = A[0]

for i in range(A[0]):
	remain -= 2*A[1] + 1
	if remain <= 0:
		judge = i + 1 
		break
print(judge)

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

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

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

Solution (Python):
A = list(map(int,input().split()))
i = A[0] / (2 * A[1] + 1)
if i > int(i):
    print(int(i) + 1)
else:
    print(int(i))

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

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

Solution (Python):
import math

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

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

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

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

print(result)

Solution (Python):
import math

nums = [int(e) for e in input().split()]
N = nums[0]
D = nums[1]

can_watch = 2 * D + 1

min_guard_num = N / can_watch
min_guard_num = math.ceil(min_guard_num)
print(min_guard_num)

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

Solution (Python):
import math

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

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

Solution (Python):
import math 
n1, n2 = [int(i) for i in input().split()]

r1 = math.ceil(n1 / ((n2 * 2) + 1))
print(r1)

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

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

print(p)

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

i = 0
while (2 * d + 1) * i < n:
    i += 1

print(i)

Solution (Python):
s=list(map(int,input().split()))
a=0
b=s[0]
i=0
j=0
for i in range(s[0]):
  if b>0:
    b=b-1-s[1]*2
    j=j+1
  else:
    break
print(j)

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

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

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

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

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

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

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

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

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):
n,d = map(int,input().split())

a = d * 2 + 1

b=n/a
b = int(b)
c=n%a
if c>0:
    b = b + 1
    
print(b)

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

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

Solution (Python):
temp=input().split()
n_trees=int(temp[0])
d=int(temp[1])

n_people=1
while (2*d+1)*n_people<n_trees:
  n_people+=1
  
print(n_people)

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



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

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

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

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

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

Solution (Python):
import math


a, b = [int(i) for i in input().split()]








print(math.ceil(a/(2*b + 1)))

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

Solution (Python):
import math

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

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

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

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

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

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

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