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):
a = input().split()
n = int(a[0])
d = int(a[1])

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

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

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

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

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

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

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

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

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

print(count)

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

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

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

Solution (Python):


import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  n,d=LI()
  return -(-n//(2*d+1))


print(main())

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

Solution (Python):
N, D = (int(x) for x in 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 = input().split()
n = int(n)
d = int(d)

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

Solution (Python):
data = input().split()
N = int(data[0])
D = int(data[1])
import math
ans = math.ceil(N/(2*D+1))
print(ans)

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

Solution (Python):
import math


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


if __name__ == '__main__':
    solve()

Solution (Python):
N,band = [int(x) for x in input().split()]
M = 2*band+1

print((N+M-1)//M)

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

ans = 0

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

print(ans)

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

def main():
    n, d = MAP()
    print(ceil(n/(2*d+1)))

if  __name__=='__main__':
    main()

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

Solution (Python):
import sys, re, os
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 S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n, d = MAP()
ans = 0
while(1):
    n -= (2 * d + 1)
    ans += 1
    if n <= 0:
        break
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(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(ans)

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

Solution (Python):

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

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

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

if n // (2*d + 1) == n / (2*d + 1):
  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("{}".format(math.ceil(N / (2 * D + 1))))

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


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

Solution (Python):
input_line = list(input().split())

N = int(input_line[0])
D = int(input_line[1])

count = 0

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

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

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

for i in range(n):
    if tmp*i < n:
        result += 1

print(result)

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

Solution (Python):
import sys
import math as m
N, D = map(int, sys.stdin.readline().strip().split(" "))
print(m.ceil(N/(D*2+1)))

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

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

Solution (Python):
import math

ND = input()
ND2= ND.split()
num=0
amari=0

N=ND2[0]
D=ND2[1]

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

Solution (Python):




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

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

    while True:
        if tmp * ans >= N:
            break
        else:
            ans += 1

    print(ans)

    return


if __name__ == "__main__":
    main()

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

print(anser)

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

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

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

Solution (Python):
import sys

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

for i in range(N):
    if N - (2*D + 1)*i <= 0:
        print(i)
        sys.exit(0)

print(N)

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

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


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

Solution (Python):
import math

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

diff = 2 * D + 1

print(math.ceil(N / diff))

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

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

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

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

Solution (Python):
import numpy as np

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

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

Solution (Python):
n,d=map(int,input().split())
person=d*2+1
count=0
for i in range(30):
  n=n-person
  count=count+1
  if n<=0:
    break
print(count)

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())
c  = 0
a = N
for i in range(20):
    c += 1
    a = a -1 -(2*D)
    if a <= 0:
        break
print(c)

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

Solution (Python):

import math

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

Solution (Python):



import math

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

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

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

Solution (Python):
a = input().split()
a = [int(i) for i in a]
count_1 = a[1]
count_2 = 0

while (True):
    if a[0] < a[1]:
        count_2 += 1
        break
    a[0] -= (a[1] * 2 + 1)
    count_2 += 1
    if a[0] < 0 or a[0] == 0:
        break

print(count_2)

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

watch = 0
tree = 0

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

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

tree = D*2 + 1

if N % tree > 0:
  print(N // tree + 1)
else:
  print(N // tree)

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

def ceil(a,b) :
    return (a + b - 1) // b

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

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

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

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

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


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

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

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

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


main()

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

Solution (Python):


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

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

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

N = int(N)
D = int(D)

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

Solution (Python):
from sys import stdin

n, d = [int(x) for x in stdin.readline().rstrip().split()]

f = d*2+1

if n % f == 0:
    human = n // f
else:
    human = n // f + 1

print(human)

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

q, mod = divmod(N, 2*D+1)
if mod >= 1:
  print(q+1)
else:
  print(q)

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

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

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

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

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

x = (d * 2 + 1)

r = 0
while(1):
    if r*x >= n:
        print(r)
        exit()
    
    r+=1

Solution (Python):
from math import ceil

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

print(ceil(n / temp))

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

Solution (Python):
from sys import stdin


def main():
    N, D = [int(x) for x in stdin.readline().rstrip().split()]
    print(N // (D * 2 + 1) + (1 if N % (D * 2 + 1) else 0))


if __name__ == "__main__":
    main()

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

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

dd = d * 2 + 1

aa = n % dd
a = n // dd

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

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

    if (N % ((D*2)+1)) == 0:
        print("{}".format(N//((D*2)+1)))
    else:
        print("{}".format(N//((D*2)+1)+1))


if __name__ == "__main__":
    main()

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

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

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

print(i)

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

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

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

tmp = int(N / (1 + D * 2))

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

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

Solution (Python):
import math


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

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

if q == int(q):
        print(int(q))
else:
        print(int(q) + 1)

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

check = D * 2 + 1
q, mod = divmod(N, check)
if mod == 0:
    ans = q
else:
    ans = q + 1

print(ans)

Solution (Python):


import math
input = list(map(int, input().split()))

N = input[0]
D = input[1]

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

print(ninnzuu)

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


preans = N/(2*D + 1)



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

Solution (Python):



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


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

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

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

Solution (Python):
def main():
    import sys
    import math
    input = sys.stdin.readline
 
    n, d = [int(i) for i in input().split()]
 
    
    print(math.ceil(n / (2 * d + 1)))
 
if __name__ == '__main__':
    main()

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
input = sys.stdin.readline






















def main():

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

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

	print(ans)


if __name__ == "__main__":
	main()

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

watchTree = d * 2 + 1

print(-(-n//watchTree))

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

dist = 2 * D + 1

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

Solution (Python):
import math

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

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

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

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

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

Solution (Python):
nd = [int(i) for i in input().split()]
print(int(-1 * ((-1*(float(nd[0]))) // (nd[1]*2+1))))

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

Solution (Python):
import math

x = input().split()

n = int(x[0])
d = int(x[1])

m = n / (2*d+1)

print(math.ceil(m))

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

x = 1 + (2 * d)

print(math.ceil(n/x))

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

while(N > Dcnt):
    cnt += 1
    Dcnt += 2*D + 1

print(cnt)

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

Solution (Python):
import math
i = list(map(int, input().split()))
N = i[0]
D = i[1]

if N % (2 * D + 1) == 0:
    A = N / (2 * D + 1)
else:
    A = math.ceil(N / (2 * D + 1))

print(int(A))

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

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

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

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

n = 0
i = 0
while i <= (N-1):
    n += 1
    i += (2*D+1)

print(n)

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

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

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

X = (N//(2*D+1))
Y = (N%(2*D+1))
ans = X if Y==0 else X+1
print(ans)

Solution (Python):
import math

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

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

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

Solution (Python):
import math


def LI(): return list(map(int, input().split()))


n, d = LI()
a = n // (2*d + 1)
b = (n % (2*d + 1)) / (2*d + 1)

print(a + math.ceil(b))

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

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

Solution (Python):
import math
N, D = (int(x) for x in 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

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

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

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

Solution (Python):
N, D = map(int, input().split())
print(-(-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())

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

Solution (Python):


s = list(map(int, input().split(" ")))

t = s[0] // (s[1]*2+1)
if s[0] % (s[1]*2+1) != 0:
    t = t + 1
print(t)

Solution (Python):



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

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

Solution (Python):
def inpl():
    return list(map(int, input().split()))


N, D = inpl()

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

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

Solution (Python):
import math

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

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

print(ans)

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

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

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

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

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

Solution (Python):
import math

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

Solution (Python):










import sys
import os
from io import IOBase, BytesIO


def main():
    n, d = get_ints()
    from math import ceil
    print(ceil(n / ((2 * d) + 1)))


BUFSIZE = 8192


class FastIO(BytesIO):
    newlines = 0

    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None

    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
        return s

    def read(self):
        while self._fill():
            pass
        return super(FastIO, self).read()

    def readline(self):
        while self.newlines == 0:
            s = self._fill()
            self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        py2 = round(0.5)
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2 == 1:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            self.write = lambda s: self.buffer.write(s.encode("ascii"))
            self.read = lambda: self.buffer.read().decode("ascii")
            self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)


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


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


def input(): return sys.stdin.readline().strip()


if __name__ == "__main__":
    main()

Solution (Python):

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

Solution (Python):
import math

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

eye = 2*d + 1

result = math.ceil(n / eye)

print(result)

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

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

Solution (Python):
import sys
from math import ceil

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

if __name__ == "__main__":
    main()

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

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

Solution (Python):
import math

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

Solution (Python):
import math

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

Solution (Python):

"""
Created on Sat Apr 20 20:47:47 2019

@author: Owner
"""

import numpy as np
import sys
import collections
import scipy.misc
import math
from operator import itemgetter
import itertools
import copy
import bisect
import heapq


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

def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
    
def getNearestValueIndex(list, num):
    """
    概要: リストからある値に最も近い値のインデックスを取得する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

def find_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

class UnionFind(object):
    def __init__(self, n=1):
        self.par = [i for i in range(n)]
        self.rank = [0 for _ in range(n)]
        self.size = [1 for _ in range(n)]

    def find(self, x):
        """
        x が属するグループを探索
        """
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def union(self, x, y):
        """
        x と y のグループを結合
        """
        x = self.find(x)
        y = self.find(y)
        if x != y:
            if self.rank[x] < self.rank[y]:
                x, y = y, x
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1
            self.par[y] = x
            self.size[x] += self.size[y]

    def is_same(self, x, y):
        """
        x と y が同じグループか否か
        """
        return self.find(x) == self.find(y)

    def get_size(self, x):
        """
        x が属するグループの要素数
        """
        x = self.find(x)
        return self.size[x]
    

"""
N, X = map(int, input().split())

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

P = [0]*N
Y = [0]*N
for n in range(N):
    P[n], Y[n] = map(int, input().split())


dp = np.zeros((N+1, 4,4,4))
    
all(nstr.count(c) for c in '753')


ABT = zip(A, B, totAB)
result = 0

sorted(ABT,key=itemgetter(2))
A, B, totAB = zip(*ABT)
A.sort(reverse=True)


(x >> i) & 1


dp = [np.inf]*N
for n in range(N):
    if n == 0:
        dp[n] = 0
    else:
        for k in range(1,K+1):
            if n-k >= 0:
                dp[n] = min(dp[n], dp[n-k] + abs(h[n]-h[n-k]))
            else:
                break

add = 1 
res = 0
sums = [0]*(len(nums)+1)
for i in range(len(nums)):
    sums[i+1] = sums[i] + nums[i]
for i in range(0, len(nums), 2):
    left = i
    right = min(i+add, len(nums))
    tmp = sums[right] - sums[left]
    res = max(tmp, res)


li, ri = bisect.bisect_left(p_ac, l[i]-1), bisect.bisect_right(p_ac, r[i]-1)    


org_list = [3, 1, 4, 5, 2]
new_list = sorted(org_list)
print(org_list)
print(new_list)




    for h in range(0,H):
        for w in range(0,W):
            if h == 0 and w == 0:
                pass
            elif h == 0:
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h-1][W-w]+1)
            elif w == 0:   
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h][W-w-1]+1)
            else:
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h][W-w-1]+1, D[H-h-1][W-w]+1, D[H-h][W-w]+2)
            d_max = max(D[H-h-1][W-w-1], d_max)

"""


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

    
def main(): 
    cnt = 0
    now = 0
    for i in range(N):
        cnt +=1
        now = now + 2*D+1
        if now >= N:
            break
        
    print(cnt)
                
                
                
            
            
                

    
if __name__ == '__main__':
    main()

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

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

first=d+1
c=1

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

print(c)

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

print(count)

Solution (Python):
import sys
sys.setrecursionlimit(10**7)
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

debug = True


def dprint(*objects):
    if debug == True:
        print(*objects)

def solve():
    N, D = LI()

    
    pos = D + 1
    

    m = 2*D + 1
    ans = N // m
    if ans * m == N:
        print(ans)
    else:
        print(ans+1)
solve()

Solution (Python):

import math
def main():
    N,D = map(int,input().split())
    out = N/(1+D*2)
    print(math.ceil(out))
if __name__ == '__main__':
    main()

Solution (Python):
import math
line = input();
nums = line.split(" ")
N = int(nums[0])
D = int(nums[1]);
ans = math.ceil(N/(2*D+1))
print(ans)

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

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