Problem:
 Score : 200 points    Problem Statement There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i -th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.      Constraints  All values in input are integers.  1 \leq N \leq 20  1 \leq D \leq 20         Input Input is given from Standard Input in the following format:  N  D       Output Print the minimum number of inspectors that we need to deploy to achieve the objective.        Sample Input 1 6 2      Sample Output 1 2  We can achieve the objective by, for example, placing an inspector under Tree 3 and Tree 4 .       Sample Input 2 14 3      Sample Output 2 2       Sample Input 3 20 4      Sample Output 3 3

Solution (Python):
import sys
import os
import math
import bisect
import collections
import itertools
import heapq

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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

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

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

Solution (Python):




geta = lambda fn: list(map(fn, input().split()))
gete = lambda fn: fn(input())

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

Solution (Python):
from math import factorial as fact
import math
import sys
import itertools
import numpy as np
from collections import Counter
import datetime
from collections import deque



def input1():
	return int(input())


def input2():
	return map(int,input().split())


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

def keta(N):
	return len(str(N))


def input_daytime(input_time):
	time,distance=input_time.split()
	t=time.split(":")
	se=str(t[-1]).split(".")
	dt1 = datetime.timedelta(hours=int(t[0]),minutes=int(t[1]),seconds=int(se[0]),milliseconds=int(se[1]))
	return dt1

def combinations(n,r):
	return list(itertools.combinations(range(n),r))



def all_sets(num_list):
	subsets=[]
	for i in range(2,len(num_list) + 1):
		for c in combinations(num_list, i):
			subsets.append(c) 
	return subsets


def ch(x1):
	cf=[]
	for i in range(2,math.sqrt(x1)+1):
		if x1 % i==0:
			cf.append(i)
	return cf

def CountOneRoots(x,y):
	
	return fact(x+y)/fact(x)/fact(y)


def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
	
def count_str(m):
	tmp={}
	for i in range(10):
		if i in tmp:
			tmp[i]=1
		else:
			tmp[i]+=1
	return tmp

def is_prime(n):
	if n==1: return True

	for i in range(2,int(math.sqrt(n))+1):
		if n%i==0:
			return False
	return True


n,d=input2()

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

Solution (Python):
import sys
import math
import bisect


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

if __name__ == "__main__":
    main()

Solution (Python):
m = input()
m = m.split(' ')
n = int(m[0])
d = int(m[1])
s = 0
q = 0
while s < n:
    s += (d * 2 + 1)
    q += 1

print(q)

Solution (Python):






import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr


def lcm(a, b):
    return a * b // gcd (a, b)




N,D = inputIL()

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

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

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

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

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

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

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

Solution (Python):
N, D = map(int, input().split())
R = 0
for i in range(1,N+1):
  R += 2 * D + 1
  if N <= R:
    print(i)
    exit()

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

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

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

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

print(ans)

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

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

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce


import sys
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = float('inf')


n, d = Is()

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

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

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

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

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

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


solve()

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

Solution (Python):
def main():
    N, D = (int(x) for x in input().split())
    ans = int((N + (2 * D)) / ((2 * D) + 1))
    print(ans)


if __name__ == "__main__":
    main()

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

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

Solution (Python):
import sys, heapq, bisect, math, fractions
from collections import deque

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

i = 0
res = 0
while i < N:
    res += 1
    i += 2 * D + 1

print(res)

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

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

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

Solution (Python):
import sys
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]

N, D = ri_()
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())

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

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

Solution (Python):
import math

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

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

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

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

r = b*2+1

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

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

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

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

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

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

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

ans = 0
see = 0
while see < n:
    see += 2 * d + 1
    ans += 1

print(ans)

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

Solution (Python):
def main():
    N, D = (int(i) for i in input().split())
    ans = 0--N//(2*D+1)
    print(ans)


if __name__ == '__main__':
    main()

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

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

tmp = 2 * D + 1

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

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

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


main()

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

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

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

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

Solution (Python):

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

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

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

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

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

if __name__ == '__main__':
    main()

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

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

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

d = d * 2 + 1

print(math.ceil(n/d))

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

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

tmp = D*2 + 1

ans = N//tmp

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

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

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

print(ans)

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

Solution (Python):

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

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

Solution (Python):


def main():
    N, D = map(int, open(0).read().split())

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


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):
import sys
input = sys.stdin.readline
def main():
    N, D = map(int, input().split())
    R = 2*D +1
    print((N+R-1)//R)

if __name__ == '__main__':
    main()

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

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

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

while n > 0:
    n = n - r
    cnt += 1

print(cnt)

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 = 0

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

print(ans)

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

Solution (Python):
from decimal import Decimal,ROUND_HALF_UP
n,d = map(int,input().split())
x = (n+d*2)//(d*2+1)
print(x)

Solution (Python):
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd 
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) 







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

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

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

d = 1+ 2*D

print(math.ceil(N/d))

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


main()

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

ans = n//(2*d)


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

count=1
for i in range(1,21):
  if n>i*(2*k+1):
    count+=1
print(count)

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

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

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

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

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

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

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

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

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

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

ans = 0
cnt = 0
while ans < n:
    ans += d*2+1
    cnt += 1

print(cnt)

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

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

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    

    
    

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

if __name__ == '__main__':
    main()

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

Solution (Python):

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

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

print(ans)

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

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

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
from itertools import permutations,  combinations, accumulate
from functools import *
from collections import deque, defaultdict, Counter
from heapq import heapify, heappop, heappush, heappushpop

INF = float('inf')
NIL = - 1

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

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

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

w = 2*D + 1

ans = (N + (w - 1)) // w

print(ans)

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())
    cnt = 0
    while True:
        a, b = divmod(N, (2*D+1))
        cnt += a
        if 2*D + 1 > b:
            if b > 0:
                cnt += 1
            break
    print(cnt)
main()

Solution (Python):
def main():
    n, d = map(int, input().split())
    per = 2 * d + 1
    res = n // per
    if n % per != 0:
        print(res + 1 )
    else:
        print(res)
if __name__ == '__main__':
    main()

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

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

print(count)

Solution (Python):
def people(n):
  p=0
  while n>0:
    n-=(d*2+1)
    p+=1
  return p

def main():
  print(people(n))
  
if __name__=='__main__':
  n,d=map(int,input().split())
  main()

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

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

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

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

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

Solution (Python):

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

a = n % (d*2+1)

if a > 0:
    print(n // (d*2+1) + 1)
else:
    print(n // (d*2 + 1))

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

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

if a % (b * 2 + 1) != 0:
    ret += 1

print(ret)

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

for i in range(N):
    cnt += D * 2 + 1
    if N <= cnt:
        print(i + 1)
        exit()

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

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

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

print(out)

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

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

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

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

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

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

for i in range(n):
    if n >= 2*d+1:
        count += 1
        n = n - (2*d+1)

if n != 0:
    count += 1
print(count)

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

Solution (Python):
import sys


def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())

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

def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'


p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")



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

Solution (Python):
import io
import math

nim, mon = list(map(int, input().split()))
print((nim-1)//(mon*2+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/(2*D+1)))

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

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

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

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

n = 2*D +1

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