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

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

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

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

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

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


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

Solution (Python):

import sys
input = lambda: sys.stdin.readline().strip()
n, d = [int(x) for x in input().split()]
l = 2 * d + 1
print((n + l - 1) // l)

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

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

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

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

Solution (Python):
import math
x,y =map(int,input().split())
print(math.ceil(x/((y+y)+1)))

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

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

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

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

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

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

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

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

Solution (Python):
import math

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

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

Solution (Python):
def main():
    n, d = list(map(int, input().split()))
    a, s = divmod(n, (d*2)+1)
    print(a) if s == 0 else print(a+1)


if __name__ == '__main__':
    main()

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

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

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

A = D * 2 + 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):
a = list(map(int,input().split()))
N = a[0]
D = a[1]

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

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

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

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

Solution (Python):
import math
tree_num, range = map(int,input().split())

range_num = range * 2 + 1

print(math.ceil(tree_num / range_num))

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

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

d=d*2+1

import math

print(math.ceil(n/d))

Solution (Python):
N,D = [int(v) for v in input().split()]
ans = int(N / (2*D + 1)) + int(N % (2*D+1) != 0)
print(ans)

Solution (Python):
import sys
import math


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


if __name__ == "__main__":
    main()

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

eye = 2 * d +1

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

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




 


 

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

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




 


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

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




 


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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

    x = 2 * D + 1

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


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):

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

Solution (Python):
def main():
    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)


if __name__ == "__main__":
    main()

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

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

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

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

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

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

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

Solution (Python):
def mapt(fn, *args):
    return list(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


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

print(main())

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 9)

def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')







def solve():
    N, D = MI()
    print((N+2*D)//(1+2*D))

if __name__ == '__main__':
    solve()

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 9)

def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')







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

if __name__ == '__main__':
    solve()

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

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

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

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

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

print(ans)

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

Solution (Python):
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import bisect_right
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
from copy import deepcopy
from decimal import Decimal
alf = list("abcdefghijklmnopqrstuvwxyz")
ALF = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")

INF = float("inf")


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

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

Solution (Python):

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

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

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

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

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

Solution (Python):
from math import *
n,k=map(int,input().split())
print(ceil(n/(2*k+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):
from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))

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

Solution (Python):
from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))

n,d=nii()
print((n+d*2+1-1)//(d*2+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):
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):
from sys import stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter,defaultdict
from operator import mul
import copy


import heapq
sys.setrecursionlimit(10**6)

INF = 10**18
import bisect
import statistics
mod = 10**9+7


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

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

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

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

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

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

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

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

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

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

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

Solution (Python):
import sys

N, D = map(int, sys.stdin.readline().split())
print((N - 1)// (2*D+1) + 1)

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

area = D * 2 + 1

result = -(-N // area)
print(result)

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

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

loop = D*2+1

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

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

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

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

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

Solution (Python):
import math

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

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

Solution (Python):




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

persons = (n - 1) // (2 * d + 1) + 1

print(persons)

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

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

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
N, D = M()
print(math.ceil(N/(2*D+1)))

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

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

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

Solution (Python):
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

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

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

Solution (Python):



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

d=2*D+1
n=N/d

if n>N//d:
    print(int(n)+1)
else:
    print(int(n))

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())
x = 1
ans = 0
while x <= n:
    x = x + (2*d+1)
    ans += 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())
security_range_per_person  = d*2+1
for i in range(1,n+1):
    if n / (security_range_per_person *i) <= 1:
        print(i)
        break

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import math
from collections import defaultdict,deque
from itertools import permutations
ml=lambda:map(int,input().split())
ll=lambda:list(map(int,input().split()))
ii=lambda:int(input())
ip=lambda:list(input())
ips=lambda:input().split()

"""========main code==============="""

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

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

Solution (Python):
N, D = [int(n) for n in input().split()]
print((N-1)//(2*D+1) + 1)

Solution (Python):
def main():
    n, d = map(int, input().split())
    x = 1

    while True:
        monitoring = (2*d+1) * x

        if monitoring < n:
            x += 1
        else:
            break

    print(x)

if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

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

Solution (Python):


import math

def main():

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

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

    print(ans)


if __name__ == "__main__":
    main()

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())
r = 2 * d + 1

if n % r == 0:
  obs = n // r
else:
  obs = n // r + 1

print(obs)

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

t = n//(2*d+1)
if n > t*(2*d+1):
    print(t+1)
else:
    print(t)

Solution (Python):
MM = input().split()
N = int(MM[0])
D = int(MM[1])
a = 2*D +1
ans1 = N//a

if N%a !=0:
  ans1 +=1
print(ans1)

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

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

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

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

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

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

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

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

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

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

Solution (Python):
from math import ceil

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

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

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

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

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

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

Solution (Python):















































global FLAG_LOG
FLAG_LOG = False


def log(value):
    
    
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    
    
    N, D = list(map(int, lines[0].split()))
    
    
    
    
    
    
    
    

    
    result = -(N // (-2*D - 1))

    return [result]



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['6 2']
        lines_export = [2]
    if pattern == 2:
        lines_input = ['14 3']
        lines_export = [2]
    if pattern == 3:
        lines_input = ['20 4']
        lines_export = [3]
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    
    
    
    



if __name__ == '__main__':
    main()

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

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

shubihani=2*d + 1

tmp = n // shubihani
if n % shubihani != 0:
    tmp += 1
print(tmp)

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**7) 
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right

from collections import deque, defaultdict


from collections import Counter

from itertools import accumulate,combinations,permutations,product

from heapq import heapify,heappop,heappush

from functools import reduce,lru_cache

from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printe(*x):print("
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def binr(x): return bin(x)[2:]
def bitcount(x): 
    x= x - ((x >> 1) & 0x5555555555555555)
    x= (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x= (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f 
    x+= (x >> 8); x+= (x >> 16); x+= (x >> 32) 
    return x & 0x7f

def main():
    mod = 1000000007
    

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


    a=K*2+1
    print(math.ceil(N/a))



if __name__ == "__main__":
    main()

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

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

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

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

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

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

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

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

x = 2 * d + 1
y = -(-n//x)


print(y)

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

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

Solution (Python):
import sys
import math

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


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

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

if not ( 1 <= N <= 20 and 1 <= D <= 20 ): sys.exit()

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

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