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

p = 2 * D + 1

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

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

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

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

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

if __name__ == '__main__':
    main()

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

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

Solution (Python):
import sys, math
from collections import defaultdict
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 1000000007
sys.setrecursionlimit(1000000)

N, D = rl()

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, k = map(int,input().split())
s, count = 1 + k, 0
while(True):
    if n-s > k:
        s += (2*k) + 1
        count += 1
    else:
        count += 1
        break
print(count)

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

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

Solution (Python):


import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    n, d = na()
    m = 2 * d + 1
    print((n-1)//m + 1)

if __name__ == "__main__":
    main()

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

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


if __name__ == '__main__':
    main()

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

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

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

if __name__ == '__main__':
    resolve()

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

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

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

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

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

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

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

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

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

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

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

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

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

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

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

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

def main():
    n, d = map(int, input().split())
    tree = 1
    ans = 0
    while True:
        ans += 1
        tree += 2 * d
        if tree >= n:
            print(ans)
            return
        tree += 1

if __name__ == '__main__':
    main()

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

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

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

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

print(num)

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

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 = (int(x) for x in input().split())
print(math.ceil(N/(2*D+1)))

Solution (Python):

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

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

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

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


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

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

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

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

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

Solution (Python):
from math import ceil
n,d = [int(z) for z in input().split()]

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

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

t = d*2 + 1

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

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

import math

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

Solution (Python):
def main():
    import math
    n, d = map(int, input().split())
    print(math.ceil(n/(2*d + 1)))
    
if __name__ == "__main__":
    main()

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

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

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

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

ans = 0
while n > 0:
    n -= 2 * d + 1
    ans += 1
print(ans)

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

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

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

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

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

num, mod = divmod(n, 2 * d + 1)
if mod == 0:
    print(num)
else:
    print(num + 1)

Solution (Python):
import math

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

Solution (Python):
import math

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

Solution (Python):
import math

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

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

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

ans = a//(2*b+1)

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

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N, D = map(int, readline().split())
    F = 2 * D + 1
    print((N + F - 1) // F)

    return


if __name__ == '__main__':
    main()

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

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

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 sys
import math
a=sys.stdin.readline()
res=[i for i in a.split()]
r1,r2=float(res[0]),float(res[1])
v1,v2=r1.is_integer(),r2.is_integer()
if v1==v2==True:
    N,D=int(r1),int(r2)
    if 1<=(N and D)<=20:
        w=2*D+1
        print(int(math.ceil(N/w)))

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

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

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

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

Solution (Python):
import sys
a=sys.stdin.readline()
res=[i for i in a.split()]
r1,r2=float(res[0]),float(res[1])
v1,v2=r1.is_integer(),r2.is_integer()
if v1==v2==True:
    N,D=int(r1),int(r2)
    if 1<=(N and D)<=20:
        w=2*D+1
        print(int((N+w-1)//w))

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

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

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

D=1+D+D

if N%D==0:
    print(int(N/D))

else:
    print(int(N/D)+1)

Solution (Python):
import math
a = list(map(int, input().split()))
print(math.ceil(a[0]/(a[1]*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())

kansi = d * 2 + 1

ans = n // kansi

if n % kansi != 0:
    ans += 1

print(ans)

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

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

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

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

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

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

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


if __name__ == '__main__':
    solve()

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

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

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

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

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

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

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

import math

tmp = d*2+1

ans = math.ceil(n/tmp)

print(ans)

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

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

if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):

import math

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

print(ans)

Solution (Python):

import math

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

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

Solution (Python):

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

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

d = d * 2 + 1

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

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

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

Solution (Python):
a,b=[int(x) for x in input().split()]
z=b*2+1
c=a/z
if c%1==0:
    print(a//z)
else:
    print(a//z+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())
k = n%(2*d + 1)
if k == 0:
  print(n//(2*d+1))
else:
  print(n//(2*d+1) + 1)

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 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 LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    n, d = LI()
    cur = 0
    cnt = 0
    while cur < n:
        cur += (2 * d + 1)
        cnt += 1
    print(cnt)


main()

Solution (Python):
from math import ceil

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

Solution (Python):
import sys

input = lambda: sys.stdin.readline().rstrip()


def solve():
    N, D = map(int, input().split())
    if N < (D * 2 + 1):
        ans = 1
    else:
        q, r = divmod(N, D * 2 + 1)
        ans = q + 1 if r > 0 else q
    print(ans)


if __name__ == '__main__':
    solve()

Solution (Python):
import math

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

T = D*2 + 1

print(math.ceil(N / T))

Solution (Python):
import math

def main():
    n,d=map(int,input().split())
    print(math.ceil(n/(2*d+1)))
        
if __name__ == "__main__":
    main()

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

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

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

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

Solution (Python):
import math


def actual(n, d):
    return math.ceil(n / (2 * d + 1))


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

print(actual(n, d))

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

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

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

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

n,d=inp()
k=0
ans=0
while k<n:
    k=k+d*2+1
    ans+=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())
x = n/(d*2+1)
print(math.ceil(x))

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

a = 1 + d + d

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

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

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

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

nou = d*2+1

for i in range(1,21):
    if nou * i >= n:
        print(i)
        break

Solution (Python):
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    n, d = map(int, input().split())
    ans = 0
    while ans * (2 * d + 1) < n:
        ans += 1
    print(ans)


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Solution (Python):
import sys


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

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

main()

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

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

Solution (Python):
from math import ceil


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


if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

Solution (Python):
import math


def solve(N, D):
    return math.ceil(N / (2 * D + 1))


if __name__ == "__main__":
    
    
    N, D = tuple(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())

count = 0
ans = 1
for i in range(N):
    count += 1

    if count == D*2 + 2:
        ans += 1
        count = 1

print(ans)

Solution (Python):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from fractions import gcd
from math import ceil, floor, sqrt
from copy import deepcopy

def main():
    
    n,d = map(int, input().split())
    ans = n / (d*2 + 1)

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


if __name__ == "__main__":
    main()

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

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

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

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

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

Solution (Python):

import sys


def solve(N: int, D: int):
    print(-(-N // (2 * D + 1)))


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

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

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

Solution (Python):

def s0():return input()
def s1():return input().split()
def s2(n):return [input() for x in range(n)]
def s3(n):return [input().split() for _ in range(n)]
def s4(n): return [[x for x in s] for s in s2(n)]
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]
def t3(n):return [tuple(int(x) for x in input().split()) for _ in range(n)]
def p0(b,yes="Yes",no="No"): print(yes if b else no)








n,d=n1()

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

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

can_see = 2*D + 1

ans = int(N / can_see)

if N%can_see != 0:
    ans += 1

print(ans)

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

Solution (Python):

import math


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


if __name__ == '__main__':
    main()

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

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

print(ans)

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

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

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

ans = n//d

if n%d == 0:
    print(ans)
else:
    print(ans + 1)

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):

import sys
input = sys.stdin.readline









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

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

import math

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

Solution (Python):


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

Solution (Python):
import math
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
import sys
input = sys.stdin.readline
N,D = (int(x) for x in input().split())
see_possible =2*D +1
ans =math.ceil(N / see_possible)
print(ans)

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

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

Solution (Python):
from math import ceil


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


c = 2 * D + 1

print(ceil(N / c))

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

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

Solution (Python):

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

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

Solution (Python):
def golden_apple(n, d):

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

    return ans

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

if __name__ == '__main__':
    main()

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

number=N//(2*D+1)
amari=N%(2*D+1)

if amari != 0:
  number=number+1
print(number)

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

Solution (Python):
import math

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

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

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

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

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

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

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

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

while True:
    ans += 1
    if D+i >= N:
        break
    i += 2*D + 1

print(ans)

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

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

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

Solution (Python):
import math
n, d = 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 / (2 * d + 1)))

Solution (Python):
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
n,d=map(int,stdin.readline().split())
print(math.ceil(n/(d+d+1)))

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

Solution (Python):
import itertools
import math
import fractions
import functools
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)+1)
else:
    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())
k = d * 2 + 1
if n % k == 0:
    print(n//k)
else:
    print(n//k + 1)

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