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

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

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

m = N // r
if N % r > 0:
    m += 1

print(m)

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

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

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

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

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

Solution (Python):
import math
def q45(n, d):
    a = math.ceil(n/(2*d+1))
    return a

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

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

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

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

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

Solution (Python):
def solve(n, d):
    i = 0
    while i * (2* d + 1) < n:
        i += 1
    return i

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

Solution (Python):
import math

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

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

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

Solution (Python):
import math

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

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

Solution (Python):
import math

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

k = d*2 + 1

print(math.ceil(n/k))

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

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

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


i = list(map(int, input().split()))
N = i[0]
D = i[1]

shiya = 2*D + 1

if N%shiya == 0:
    human = int(N/shiya)
else:
    human = int(N/shiya)+1

print(human)

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

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

Solution (Python):
import math
import fractions
import copy
import numpy as np

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
x,y = ips()
y= y*2+1
if x%y == 0:
    print(x//y)
else:print(x//y+1)

Solution (Python):
import math

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

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

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

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

c = D * 2 + 1

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

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

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

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

Solution (Python):
import math

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

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

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):
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())
ans = sum(1 for _ in range(0, 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(' '))
d = d * 2 + 1
r = int(n / d)
if n % d > 0:
    r += 1
print(r)

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

Solution (Python):
from enum import Enum
from queue import Queue
import collections

import sys
import math

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001
N,D = map(int,input().split())
print(-(-N//(D*2+1)))

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

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

Solution (Python):
from math import ceil

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

t = 2 * d + 1

print(ceil(n/t))

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

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

print(ans)

Solution (Python):
nd=input()
ndlis=['' for i in range(2)]
ndlis=nd.split()
n=int(ndlis[0])
d=int(ndlis[1])
on=0
cnt=0
while on==0:
	cnt=cnt+1
	if n<=cnt*(d*2+1):
		on=1
print(cnt)

Solution (Python):
from sys import stdin

N, D = [int(x) for x in stdin.readline().rstrip().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()))
sight = 2*d+1
print((n//sight) + (n%sight != 0))

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

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys, math, bisect, random, itertools
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    n = II()
    print(n*n*3)
    return


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


def C():
    return


def D():
    return


def E():
    return


def F():
    return


if __name__ == '__main__':
    B()

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

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

x = 0
while True:
  if N <= (2 * D + 1) * x:
    break
  x += 1
print(x)

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

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

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

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

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

Solution (Python):
from math import ceil

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

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

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())
    print( (n+d*2)//(d*2+1))
if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N,D=MAP()

print(ceil(N, (D*2+1)))

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

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

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

print(ans)

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

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

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

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

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

Solution (Python):
a = list(map(int,input().split()))
arboles = a[0]
D = a[1]
API = (D*2)+1
inspectors = arboles//API
if arboles%API>0:
    print((inspectors)+1)
else:
    print(inspectors)

Solution (Python):
import sys, math, itertools, bisect, copy, re
from collections import Counter, deque, defaultdict






INF = float('inf')
MOD = 10 ** 9 + 7
EPS = 10 ** -7
sys.setrecursionlimit(1000000)









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

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

pass

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

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

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

w = d * 2 + 1

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

Solution (Python):
'''input
20 4
'''

from math import ceil;

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

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

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

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

    if answer == int(answer):
        print(int(answer))
    else:
        print(int(answer+1))
        
    
if __name__ == '__main__':
    main()

Solution (Python):

from math import ceil


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


if __name__ == "__main__":
    main()

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

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

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

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

range_of_i = D + 1
range_of_i += D

rem = N % range_of_i
tmp = N // range_of_i

ans = 0
if rem > 0:
    ans = tmp + 1
else:
    ans = tmp

print(ans)

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

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

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

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

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

Solution (Python):
n, d = [ int(_) for _ in input().split() ]
x  = n / (2*d+1)

if x.is_integer():
    print( int(x//1) )
else:
    print( int( (x//1) + 1) )

Solution (Python):
def main():
    N, D = [int(i) for i in input().split()]
    print(N // (D*2+1) + (0 if N%(D*2+1) == 0 else 1))
main()

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

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

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

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

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

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

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

Solution (Python):
tree,R=[int(i) for i in input().split(" ") ]
w =0
r= 2*R+1
while tree>0:
    tree-=r
    w+=1
print(w)

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
N,D = map(int, input().split())
"""
i-D i+D
2D+1個見ることができる

15 1 -> 5コずつ見られる

1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
"""
if N%(2*D+1)==0:
    print(N//(2*D+1))
else:
    print(N//(2*D+1)+1)

Solution (Python):
N, D = [int(i) for i in input().split()]
print(-(-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 sys
import copy

sys.setrecursionlimit(1000000)


from collections import defaultdict



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

K = D * 2 + 1

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

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

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

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

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

print(a)

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

if N%a==0:b-=1
print(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())

man=d*2+1

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

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

Solution (Python):
temp = input().split()
N=int(temp[0])
D=int(temp[1])
can_read=2*D+1
cnt=0
while(N>0):
    N=N-can_read
    cnt=cnt+1
print(cnt)

Solution (Python):

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



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

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

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

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

Solution (Python):
n,d=map(int,input().split());print(0--n//(d-~d))

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

Solution (Python):
n,d=map(int,input().split());print(0--n//(d-~d))

Solution (Python):

def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return list(input())
n,d=IL()
import math
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):

S=input()

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

result=float(N/(2*D+1))

if result-int(result)>0:
    result=int(result)+1
else:
    result=int(result)

print(result)

Solution (Python):


a = list(map(int,input().split()))
N = a[0]
D = a[1]
D = 2 * D + 1
i = 1
while i*D < N:
  i += 1
print(i)

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




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

import sys


def solve(N: int, D: int):
    i, area = 1, (D*2 + 1)

    while N > area:
        area += (D*2 + 1)
        i += 1

    print(i)

    return


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


if __name__ == '__main__':
    main()

Solution (Python):

import math

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

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

Solution (Python):
nums = input().split()

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

m = 1

while n > m * ((2 * d) + 1):
    m += 1

print(m)

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

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,M) = (int(i) for i in input().split(" "))
print(int((N+M*2)/(1+M*2)))

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

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

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

s= False

for i in range(20):
    s= 2*b+1
    t=i
    if(s*i>=a):
        break
print(t)

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

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

N = i[0]
D = i[1]

r = 2*D + 1

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

Solution (Python):
N, D = map(int, input().split())
if N//2 <= D:
    print(1)
else:
    cnt = 0
    i = 1
    j = 1
    while i <= N:
    
        if i != 1 and (i-j) % D == 0:
            cnt += 1
            j += 1
    
            if ((i + D) < N) and ((i + 2*D) > N):
    
                cnt += 1
                break
            else:
                i += 2*D
        i += 1

    print(cnt)

Solution (Python):
n , m = map(int,input().split())
print( (n+2*m)//(2*m+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())
re=2*D+1
co=0

while True:
  N-=re
  co+=1
  if(N<=0):
    break
    
print(co)

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

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

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

i=1
answer=0
while(True):
    i = i + 2*d + 1
    answer += 1
    if (i-1)>=n:
        break
        
print(answer)

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

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

Solution (Python):


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

d = c * 2 + 1
e = -(-b // d)

print(e)

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

if __name__ == '__main__':
    main()

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

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

Solution (Python):
if __name__ == '__main__':
    n, d = map(int, input().split())
    x = n // (1+ 2*d)
    y =n % (1+ 2*d)
    x = int(x)
    if y > 0:
        x = x+1

    print(x)

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

max = (n - d) - d
count = 1

for i in range(1000):
  if max <= 1:
    break
  max = (max - (d*2) -1) 
  count += 1

print(count)

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

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

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

def SORO_INT(): return int(INPUT())
def MULT_INT_LIST(): return list(map(int, INPUT().split()))
def MULT_INT_MAP(): return map(int, INPUT().split())
def SORO_STRING(): return INPUT()
def MULT_STRING(): return INPUT().split()

N,D = MULT_INT_MAP()
x = D*2+1
y = N/x


def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False

if is_integer_num(y):
    print(int(y))
else:
    y = int(y)
    print(y+1)

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

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

Solution (Python):
import math, string, itertools, fractions, heapq, collections, re, array, bisect, copy, functools, random
import sys
from collections import deque, defaultdict, Counter; from heapq import heappush, heappop
from itertools import permutations, combinations, product, accumulate, groupby
from bisect import bisect_left, bisect_right, insort_left, insort_right
from operator import itemgetter as ig
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20; INF = float("INF"); ans = 0; tmp = 0; ansli = []; tmpli = []; candili = []
eps = 1.0 / 10 ** 10; mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]; ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]; ddn9 = ddn + [(0, 0)]
"""for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:"""
def wi(): return list(map(int, sys.stdin.readline().split()))
def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def ws(): return sys.stdin.readline().split()
def i(): return int(sys.stdin.readline())
def s(): return input()
def hi(n): return [i() for _ in range(n)]
def hs(n): return [s() for _ in range(n)]
def mi(n): return [wi() for _ in range(n)]
def mip(n): return [wip() for _ in range(n)]
def ms(n): return [ws() for _ in range(n)]

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

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

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

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

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

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

Solution (Python):
A, B = map(int, input().split())

cnt = (B * 2) + 1

for i in range(1, 1+A):
  if i*cnt >= A:
    print(i)
    break

Solution (Python):

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

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

while N > 0:
    N -= number
    ans += 1
print(ans)

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

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

Solution (Python):
N, D = map(int, input().split(" "))
lis = [1]*N
range_ = (2 * D) + 1

sho   = len(lis) // range_
amari = len(lis) %  range_

ninzu = amari // range_

if amari == 0:
  print(sho)
else:
  print(sho + 1)

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

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

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

Solution (Python):
n, d = map(int, input().split())
a = 1
while True:
    max_insight = (d * 2 + 1) * a
    if max_insight >= n:
        break
    a += 1
print(a)

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

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

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

Solution (Python):
n, d = map(int, input().split())
num = 0
for i in range(0, n+1, 2*d+1):
    if i  < n:
        num= num+1
else:
    print(num)

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

i = 1
left = 1
res = 0
while i <= N:
    if i - D == left:
        left = i + D + 1
        res += 1
    i += 1

if left <= N: res += 1

print(res)

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

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

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

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

i = 1 + int(D)

L = i + int(D)

print(math.ceil(int(N)/L))

Solution (Python):
import math

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

Solution (Python):
from math import ceil
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

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

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

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

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

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())
count  = 0
while True:
    if N<=0:
        break
    N -= 2*D+1
    count+=1
print(count)

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

Solution (Python):

import sys

import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

readl= lambda: list(map(int, sys.stdin.readline().split()))
readt= lambda: tuple(map(int, sys.stdin.readline().split()))
read = lambda: sys.stdin.readline().rstrip()
readi = lambda: int(read())
readmi = lambda: map(int, sys.stdin.readline().split())
readms = lambda: map(str, sys.stdin.readline().split())

a, b = readmi()

count = 1
n = b + 1
while(n + b < a):
    n += (b * 2) + 1
    count += 1
print(count)

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

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

Solution (Python):
import math
a=input().split()
n=int(a[0])
d=int(a[1])

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

Solution (Python):
N,D = list(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())
ans =-(-N//(2*D+1))
print(ans)

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

L = D*2 + 1

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

Solution (Python):
import math

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

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

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

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

Solution (Python):
from math import ceil

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

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

Solution (Python):
import math

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

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