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

a = int(n / (d*2+1))


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

else:
    print(a + 1)

Solution (Python):

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



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

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

Solution (Python):


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

r = N // (2 * D + 1)
d = N % (2 * D + 1)

if d == 0:
    ans = r
else:
    ans = r + 1

print(ans)

Solution (Python):
import math
n, d = [int(i) for i in 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())
j=2*d+1
if n%j==0:print(n//j)
else:
  print(n//j+1)

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

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

Solution (Python):
import math

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

width = 2 * d + 1

print(math.ceil(n / width))

Solution (Python):
p = input().split()
n, d = int(p[0]), int(p[1])
k = n/(1+2*d)
if k == (n-1)//(2*d):
    print(int(k))
else:
    print(int(k)+1)

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

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

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

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

Solution (Python):
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline



def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [N, D] = [int(input_raw[0]), int(input_raw[1])]
    K = 2 * D + 1
    print N / K + (1 if N % K != 0 else 0)

if __name__ == '__main__':
    main()

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

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

Solution (Python):


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

div = 2 * d +1

print(n//div + int(n%div != 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())

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

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

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

a = 2 * d + 1

if n % a == 0:
    ans = n / a
else:
    ans = n // a + 1

print(int(ans))

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

import math

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

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

if a % (1 + 2 * b) == 0:
    print(a // (1 + 2 * b))
else:
    print(a // (1 + 2 * b) + 1)

Solution (Python):
import math

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

range_num = 2 * D + 1

print(math.ceil(N / range_num))

Solution (Python):


import os
import sys

N, D = map(lambda x: int(x), input().split(" "))

M = 2 * D + 1

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

Solution (Python):

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

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

Solution (Python):
from math import ceil

N, D = map(int, input().split())
R = D * 2 + 1

print(ceil(N / R))

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

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

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

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

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

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

Solution (Python):
import math


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


n = (2 * D) + 1


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

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

Solution (Python):
import math

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

h = 2*D+1

num = math.ceil(N/h)

print(num)

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

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

print(ans)

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

d = D*2 + 1

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

Solution (Python):
import numpy as np
a = input().split(" ")
N = int(a[0])
D = int(a[1])
if N%(2*D + 1) != 0:
    print(int(N/(2*D + 1)) + 1)
else:
    print(int(N/(2*D + 1)))

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

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

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

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

A = N // (2*D+1)
B = N % (2*D+1)

if B > 0:
    A +=1

print(A)

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

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

Solution (Python):
import sys
import math

n,d = [ int(x) for x in sys.stdin.readline().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(float, (input().split()))
print(math.ceil(n/(d*2+1)))

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

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

d=2*D+1

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

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

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

Solution (Python):
from sys import stdin
import math
import fractions
from collections import deque
from collections import Counter
import itertools

INF = 10 ** 10

N, D = [int(x) for x in stdin.readline().rstrip().split()]

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

print(ans)

Solution (Python):

import sys
import math


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

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

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

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

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

Solution (Python):

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

R = 2*D+1

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

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

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

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

res = N // (2*D + 1)
d = N % (2*D + 1)

if d != 0:
    res += 1
    
print(res)

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

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 = 2 * D + 1
result = N // n
if N % n > 0:
    result += 1

print(result)

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

if n % k == 0:
    t = n // k
else:
    t = n // k + 1

print(t)

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

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

v = 2 * D + 1

import math
print( math.ceil(N / v) )

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):


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

X = N / (1+2*D)
Y = N // (1+2*D)
if X==Y:
    print(Y)
else:
    print(Y+1)

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

Solution (Python):


from math import ceil


def solve():
    N, D = list(map(int, input().split()))
    cover = 2 * D + 1
    return ceil(N / cover)


def main():
    print(solve())


if __name__ == "__main__":
    main()

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

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


ans=1
left=0
while True:
    right=left+2*D+1
    if right>=N:
        print(ans)
        exit()
    left=right
    ans+=1

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

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

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

Solution (Python):
import math

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

s=d+d+1

print(math.ceil(n / s))

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

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

print(a+b)

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

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

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


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

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

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

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

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

r = 2 * D + 1

ans = int(ceil(N / r))
print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(10**7)
import math
mod = 10**9 + 7
def I(): return int(input())
def II(): return map(int, input().split())
def L(): return list(map(int, input().split()))
def TWO(M):
  L=[0]*M
  R=[0]*M
  for i in range(M):
    L[i],R[i] = II()
  return L, R

N,D = II()
ans = 1
right = 2*D+1
while 1:
  if right >= N:
    break
  right += 2*D+1
  ans += 1
print(ans)

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

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

Solution (Python):
import sys, math

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

    monitor = D*2+1

    ans = math.ceil(N/monitor)
    print(ans)

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

if __name__ == "__main__":
    resolve()

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

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

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

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

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


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

Solution (Python):
import math


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


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

Solution (Python):
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque

from itertools import product

from itertools import permutations

from itertools import combinations

from itertools import accumulate
from bisect import bisect_left, bisect_right

import re




def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
def line_inpl(x): return [i_inpl() for _ in range(x)]

INF = int(1e18)
MOD = int(1e9)+7 



N, D = l_inpl()

ans = 0
cnt = 0
while True:
    ans += 1 + 2*D
    cnt += 1
    if ans >= N:
        break
print(cnt)

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

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

Solution (Python):
import sys
import math

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

if __name__ == "__main__":
    n, d = map(int, input().split())

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

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

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

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

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

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

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

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

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

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

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

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

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

x, y = divmod(n, 2 * d + 1)

if y == 0:
  print(x)
  
else:
  print(x+1)

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


res = 0
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())
ans=1
while(n>(2*d+1)*ans):
    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())
X=2*D+1
Y=N//X
Z=N%X
if Z==0:
    print(Y)
else:
    print(Y+1)

Solution (Python):

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

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

print(ans)

Solution (Python):
N,D=[int(x) for x in input().split()]
man=0
i=1
while True:
  man+=1
  ii=i+2*D
  if ii>=N:
    break
  else:
    i=ii+1

print(man)

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


print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(4100000)
a,b = [int(i) for i in input().split()]
b = b*2+1
temp = a/b
temp2 = a//b
if temp > temp2:
    print(int(temp)+1,)
else:
    print(temp2)

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

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

Solution (Python):
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, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-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 _pf(s): return print(s, flush=True)

N, D = LI()

x = 2*D + 1
res = N//x
if N % x > 0:
    res += 1
print(res)

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

Solution (Python):
N, D = [int(i) for i in 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())

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

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

Solution (Python):
def div_ceil(a, b):
	return (a + b - 1) // b


n, d = (int(x) for x in input().split())
print(div_ceil(n, 2 * d + 1))

Solution (Python):
import sys
import math


def input():
    return sys.stdin.readline()[:-1]


def main():
    n, d = map(int, input().split())
    print(math.ceil(n/(d+d+1)))


if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(4100000)

import logging

logging.basicConfig(level=logging.DEBUG)

logger = logging.getLogger(__name__)


def resolve():
    N, D = [int(x) for x in sys.stdin.readline().split()]

    logger.debug('{} {}'.format(N, D))

    def ceil_int(a, devider):
        """
        floor は a // devider でいい。
        math.floor(a / divedier)　だとオーバーフローしちゃう。
        """

        if (a % devider > 0):
            a_ceil = a // devider + 1
        else:
            a_ceil = a // devider

        return a_ceil

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


if __name__ == "__main__":
    resolve()





import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """6 2"""
        output = """2"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """14 3"""
        output = """2"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """20 4"""
        output = """3"""
        self.assertIO(input, output)

    def test_入力例_4(self):
        input = """1 1"""
        output = """1"""
        self.assertIO(input, output)

Solution (Python):

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

print(ans)

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

Solution (Python):
import math

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

Solution (Python):
import math


num_tree, watchable_diff = map(int, input().split(' '))

per_watcher = watchable_diff * 2 + 1

print(math.ceil(num_tree / per_watcher))
exit(0)

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

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

parson =  n / (1+d*2)
if n / (1+d*2) % 1 != 0:
    parson += 1

print(int(parson))

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


if __name__ == "__main__":
    [n, d] = li()
    print((n - 1) // (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())
i=0
su=0
while su<N:
  i=i+1
  su=su+2*D+1
  
print(i)

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

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

Solution (Python):


import sys
import math
import collections
import itertools
def input(): return sys.stdin.readline().strip()
def gcd(x, y): return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y): return (x * y) // gcd(x, y)
MOD = 10 **9 + 7



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







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

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

Solution (Python):
N,D = [int(i) for i in input().split()]
from math import ceil
print(ceil(N/(D*2+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())

    a = n // (2 * d + 1)
    if (n - a * (2 * d + 1)) != 0:
        print(a + 1)
        return

    print(a)


if __name__ == '__main__':
    main()

Solution (Python):
import math

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

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    
    n, d = map(int, input().split())
    d = 2 * d + 1
    print((n + d - 1) // d)
    
    return 0

main()

Solution (Python):
from collections import defaultdict, deque
import sys

sys.setrecursionlimit(100000)

MIN = -10 ** 9
MAX = 10 ** 9 + 7


def main():
    
    N, D = [int(a) for a in input().split()]

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


        print(N// (2 * D + 1))
    else:
        print(N // (2 * D + 1)+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 sys
def input():
    return sys.stdin.readline()[:-1]
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())

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

Solution (Python):
import sys
sys.setrecursionlimit(100000)

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

n,d=intinput()
t=2*d+1
print(int(n//t)+1 if n%t!=0 else n//t)

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

Solution (Python):


import math
import sys
import itertools
import numpy as np


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 sys

def main():
    input = sys.stdin.readline
    N, D = map(int, input().split())
    return (N + 2*D) // (2*D + 1)


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

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

Solution (Python):
from collections import defaultdict, Counter
import sys
sys.setrecursionlimit(10 ** 5 + 10)

import math



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

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

    print(ans)


if __name__ == '__main__':
    main()

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

q = n // (2*d+1)
r = n % (2*d+1)

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

Solution (Python):



import sys
import math
import bisect
from heapq import heappush, heappop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
mod = 10**9 + 7

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

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

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

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

syo = n // (2 * d + 1)
amr = n % (2 * d + 1)

if amr == 0:
    print(syo)
else:
    print(syo + 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 = 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:
    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):
import math

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

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

Solution (Python):
import numpy as np

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

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

Solution (Python):
hoge = input().split()
N = int(hoge[0])
D = int(hoge[1])
count = 0
hoge = N
while(True):
  count +=1
  hoge = hoge - (1+D+D)
  if hoge <= 0:
    break
print(count)

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

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

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

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

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

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

leng = D * 2 + 1

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

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

Solution (Python):
import sys
import math

fin = sys.stdin.readline
N, D = [int(elem) for elem in fin().split()]

watch_num = 2 * D + 1
result = N / watch_num

print(math.ceil(result))

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

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

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

Solution (Python):
N,D = list(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())
a = N//(2*D+1)
b = N%(2*D+1)
if b != 0:
  print(a+1)
else:
  print(a)