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

x = 2 * d + 1
y = n / x

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

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

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    from math import ceil
    n,d=map(int,input().split())
    print(ceil(n/(2*d+1)))
resolve()

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

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

Solution (Python):
import unittest


class TestB(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think(6, 2), 2)

    def test_2(self):
        self.assertEqual(think(14, 3), 2)

    def test_3(self):
        self.assertEqual(think(20, 4), 3)


def solve():
    n, d = read()
    result = think(n, d)
    write(result)


def read():
    return read_int(2)


def read_int(n):
    return list(map(lambda x: int(x), read_line().split(' ')))[:n]


def read_float(n):
    return list(map(lambda x: float(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(n, d):
    territory = 2 * d + 1
    if n % territory == 0:
        return n // territory
    return n // territory + 1


def write(result):
    print(result)


if __name__ == '__main__':
    
    solve()

Solution (Python):


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

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

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

Solution (Python):
import math

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

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

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

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

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

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

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

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

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

Solution (Python):
import math

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

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

print(ans)

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

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

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

Solution (Python):
import math

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

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

Solution (Python):
tmp =list(map(int, input().split()))
n = tmp[0]
d = tmp[1]
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())

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

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=[]
for i in range(1,n+1):
    a.append(i)
flag=True
co=0
while flag==True:
    if len(a)>2*d+1:
        a=a[2*d+1:]
        co+=1
    else:
        co+=1
        flag=False
print(co)

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

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

visible = d * 2 + 1

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

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

Solution (Python):

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


if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
import math

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

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

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())
count=0
i=0
while True:
  i+=(d*2)+1
  if i<n:
    count+=1
  else:
    count+=1
    print(count)
    break

Solution (Python):
n, d = [int(i) for i in input().split()]
ans = 1
while ans*(2*d+1) < n:
        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())
n = 0
while N-(2*D+1)*n > 0:
  n += 1
print(n)

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

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

print(-(-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())
ans = 0

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

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

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

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


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

Solution (Python):
import math

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


if __name__ == '__main__':
    main()

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

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


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

print(ans)

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

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

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

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

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

    if N>0:
        ans+=1

print(ans)

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

ans = -(-n // (d * 2 + 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())
k = d + 1
ans = 0
isnegetive = False
while isnegetive == False:
  ans += 1
  x = n - (k + d)
  
  k = k + d + 1 + d
  
  if x <= 0:
    
    isnegetive = True
  
print(ans)

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

Solution (Python):
ND = input().split()
N = int(ND[0])
D = int(ND[1])
ans = 0
for i in range(N):
    if N <= (((2 * D) + 1) * ans):
        break
    else:
        ans += 1
print(ans)

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

Solution (Python):
import math

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

see = 2*D + 1

print(math.ceil(N/see))

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

Solution (Python):
from math import ceil

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

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

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

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

x = D+D+1
N += (-N)%x
answer = N//x
print(answer)

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

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

Solution (Python):
import math

def main(N, D):
    print(math.ceil(N / (2*D+1)))

if __name__ == '__main__':
    N, D = map(int, input().split())
    main(N, D)

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

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

cnt = 0
while N > 0:
	cnt += 1
	N -= 2*D + 1

print(cnt)

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

print((a-1) // (2*b+1)+1)

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

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

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

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

print(-(-n//(2*d+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):
import math 
N,D = map(int, input().split())
print(math.ceil(N/(D*2+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())
ans=1
for i in range(100):
    if 2*d+1<n:
        n=n-2*d-1
        ans+=1
    else:
        break
print(ans)

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

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

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

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

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

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

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

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

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

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



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

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

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

m =1+D*2

print(-(-N//m))

Solution (Python):
import math
import sys
def input():
    return sys.stdin.readline()[:-1]

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

watch_range = D * 2 + 1

print(math.ceil(N / watch_range))

Solution (Python):
n,d=map(int,input().split())
print(__import__('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
import sys
input = sys.stdin.readline


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())
dd = (2 * D + 1)
print(N // dd + (N % dd != 0))

Solution (Python):
import math

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

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

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

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

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

Solution (Python):
from math import ceil

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

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

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

if n % (2 * d + 1) == 0:
  ans = n / (2 * d + 1)
else:
  ans = math.floor(n / (2 * d + 1)) + 1

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

canSee = D*2+1
a = N//canSee

if N > a*canSee:
    a += 1

print(a)

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

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

Solution (Python):
import math
n, d = (int(x) for x in 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):
def slove():
    import sys
    input = sys.stdin.readline
    n, d = list(map(int, input().rstrip('\n').split()))
    d = 1 + 2 * d
    print((n + d - 1) // d )


if __name__ == '__main__':
    slove()

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

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

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

Solution (Python):
def main():

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


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

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

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

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

Range = 2*D + 1

ans = N // Range

if (N == ans * Range):
    print(ans)
else:
    print(ans + 1)

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

print(ans)

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):
def main():
    n, d = map(int, open(0).read().split())

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

if __name__ == '__main__':
    main()

Solution (Python):
def main():
    n, d = map(int, open(0).read().split())

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

if __name__ == '__main__':
    main()

Solution (Python):
import math

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

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

Solution (Python):
import math

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

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

Solution (Python):
N_D = list(map(int,input().split()))
max_watch = N_D[1] * 2 + 1
n = 0

while N_D[0] > max_watch * n:
    n += 1
print(n)

Solution (Python):



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

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

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

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

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

print(ans)

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

s = 0
c = 0
while (s < a):
  s += 2*b + 1
  c += 1

print(c)

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

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

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

Solution (Python):
N, D = list(map(int, input().split()))
n, m = divmod(N, 2*D+1)

print(n + (m > 0))

Solution (Python):
N, D = map(int, input().split())
p_range = D * 2 + 1
q, mod = divmod(N, p_range)

if mod:
    print(q+1)
else:
    print(q)

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

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

print(count)

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

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

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

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

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

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

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

Solution (Python):

import sys


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

    people = 0
    while people * watch_range < N:
        people += 1

    print(people)


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  
    D = int(next(tokens))  
    solve(N, D)


if __name__ == "__main__":
    main()

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

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

for i in range(11):
  if(N <= (2*D+1)*i):
    ans = i
    break
print(ans)

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

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

Solution (Python):
import math

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

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

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

if N-(2*D+1)<=0:
  print(1)
else:
  ans=0
  while N-(2*D+1)>0:
    ans =ans+1
    N=N-(2*D+1)
    if N-(2*D+1)<=0:
      print(ans+1)
      break

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

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

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

check = 1 + 2 * d

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

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

N = A[0]
D = A[1]

watch = 1 + (D * 2)

reminder = N % watch

range = N // watch

if reminder == 0:
	print(range)
elif reminder != 0:
	print(range + 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(int((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):
import math
N, D = list(map(int,input().split()))
print(math.ceil(N/(D*2 + 1)))

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

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

Solution (Python):
x=list(input().split())
n=int(x[0])
d=int(x[1])
range=2*d+1
print(-(-n//range))

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

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

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

Solution (Python):
n=[int(i) for i in input().split()]
if(n[0]%(2*n[1]+1)!=0):
  print(int(n[0]/(2*n[1]+1)+1))
else:
  print(int(n[0]/(2*n[1]+1)))

Solution (Python):
import math

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

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

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

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

Solution (Python):
import math

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

r = 2 * d + 1

ans = math.ceil(n / r)

print(ans)

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

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

Solution (Python):
from sys import stdin
N, D = [int(_) for _ in stdin.readline().rstrip().split()]
ans = (N + D * 2) / (D * 2 + 1)
print(int(ans))

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

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

from math import ceil

result = ceil(N / (D + D + 1))

print(result)

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

Solution (Python):
import math

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

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

Solution (Python):
import math

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

a = 2 * d + 1

print(math.ceil(n / a))

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

Solution (Python):
import math
N,D = list(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 / (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())

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

Solution (Python):



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

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

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

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

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

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

Solution (Python):
import math

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

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

Solution (Python):
N,D = map(int,input().split())
cnt=0
for i in range (N+1):
  if N-(i*((2*D)+1))>0:
    cnt +=1
  else :
    break
print(cnt)

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

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

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


for i in range(1,8):
    if i >= n[0]/(2*n[1]+1):
        print(i)
        break

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


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

Solution (Python):

import sys
import math
sys.setrecursionlimit(10 ** 7)


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




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


if __name__ == '__main__':
    main()

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

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

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

else:
	print(k+1)

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

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

Solution (Python):
[n,d]=[int(x) for x in input().split()]
ans=n/(2*d+1)
if ans-int(ans)>0:
  print(int(ans)+1)
else:
  print(int(ans))

Solution (Python):
N,D=map(int,input().split())
x=0
for i in range(20):
  if N-(2*D+1)>0:
    N-=2*D+1
    x+=1
  else:
    x+=1
    break
print(x)

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

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

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

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

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

print(x)

Solution (Python):

import math




def main():
    line = input()
    numbers = [int(x) for x in line.split()]
    n = numbers[0]
    d = numbers[1]
    interval = 2 * d + 1
    print(math.ceil(n / interval))



if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
import math
def func():
    num_apple, index = input('').rstrip().split(' ')
    return math.ceil(int(num_apple) / (2*int(index) + 1))

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

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

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

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

width = 2*D + 1
q, mod = divmod(N, width)

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

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

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