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
input = sys.stdin.readline
import math
import collections
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

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

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

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

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

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

quotient = n // (2 * d + 1)
surplus = n % (2 * d + 1)

if surplus == 0:
    print(quotient)
else:
    print(quotient + 1)

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

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

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

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

for i in range(20):
    if a*i >= n:
        print(i)

        break

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

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

'''
 ex) N = 10, D = 3
     ○ ○ ○ ○ ○ ○ ○ ○ ○ ○
           u     u
'''
import math

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

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

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

Solution (Python):
import math

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

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

Solution (Python):
def q2():
    """ B - Golden Apple """
    N, D = (int(i) for i in input().split())
    d, m = divmod(N, D*2+1)
    if m > 0:
        d += 1
    print(d)


if __name__ == '__main__':
    q2()

Solution (Python):
import math

inputted = list(map(int, input().split()))
N = inputted[0]
D = inputted[1]

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

print(answer)

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

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

Solution (Python):
import math

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

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

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

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

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

Solution (Python):
import math

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

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

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

Solution (Python):










def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)
  
def main():
  n,d = map(int,input().split())
  d = d*2 + 1
  print(kiri(n,d))
  
if __name__ == '__main__':
  main()

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

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

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

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

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

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

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

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

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

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

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n,d=INTM()
    print(int((n+(d*2+0.9))//(d*2+1)))
if __name__ == '__main__':
    do()

Solution (Python):

import sys


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



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

if __name__ == '__main__':
    main()

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

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

Solution (Python):
import math
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))
n,d = iim()

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

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

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

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

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

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

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

Solution (Python):

"""
Created on Sat Mar 28 17:32:21 2020

@author: Kanaru Sato
"""

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

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

print(ans)

Solution (Python):
import math

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
def main():
    n, d = map(int, input().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):
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 = [int(i) for i in input().split()]
a = 2*d+1
print((n+a-1)//a)

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

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

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

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

d = d*2+1

print(math.ceil(n/d))

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

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

print(cnt)

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

Solution (Python):












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

ans = 0
minus = 2*d +1
while n > 0:
    ans += 1
    n -= minus

print(ans)

Solution (Python):
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N, D = lr()

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

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

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

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

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

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

Solution (Python):
import math
n,d = map(int,raw_input().split())
print int(math.ceil(float(n)/float(((d*2.0)+1.0))))

Solution (Python):

import sys


def solve(N: int, D: int):
    return



def main():
    N,D = [ int(s) for s in input().split() ]
    if N % (2*D+1) == 0:
        print(int(N / (2*D+1)))
    else:
        print(int(N / (2*D+1))+ 1)

    

if __name__ == '__main__':
    main()

Solution (Python):
import os, sys, re, math

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

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

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

Solution (Python):

import sys


def solve(N: int, D: int):
    return



def main():
    N,D = [ int(s) for s in input().split() ]
    if N % (2*D+1) == 0:
        print(int(N / (2*D+1)))
    else:
        print(int(N / (2*D+1))+ 1)

    

if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

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

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

r = 2*D+1
ans = -N//r

print(-ans)

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

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

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

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

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

Solution (Python):
def solve():
    N, M = map(int, input().split())
    c = 0
    r = 0
    while r < N:
        r += M*2 + 1
        c += 1

    return c

print(solve())

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

Solution (Python):

"""
B - Golden Apple
https://atcoder.jp/contests/abc134/tasks/abc134_b

"""
import sys


def solve(N, D):
    ans = 1
    covered = D + 1 + D
    while covered < N:
        ans += 1
        covered += (2*D + 1)
    return ans


def main(args):
    N, D = map(int, input().split())
    ans = solve(N, D)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Solution (Python):
import sys
import os
import math


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

    N, D = list(map(int, sys.stdin.readline().split()))
    look = 2 * D + 1
    print(math.ceil(N / look))


if __name__ == '__main__':
    main()

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

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

Solution (Python):

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

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

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

Solution (Python):
N, D = [int(i) for i in input().strip().split()]
q, r = divmod(N, 2*D+1)
if r == 0:
  print(q)
else:
  print(q+1)

Solution (Python):
import math
import sys

m=10**9 + 7 
sys.setrecursionlimit(1000010)
(N,D) = list(map(int,input().split()))
d = D * 2 + 1
print ((N+d-1)//d)

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

Solution (Python):
import math
number = input().split(" ")
N = int(number[0])
D = int(number[1])

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

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

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

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

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

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

print(ans)

Solution (Python):

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

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

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

if __name__ == "__main__":
    main()

Solution (Python):
import sys
import math

'''a,b= map(int,input().split())'''


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):
a,b=map(int,input().split()) 
for i in range(21): 
	l=(b*2+1)*i 
	if l>=a: 
		print(i) 
		break

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

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

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

print(ans)

Solution (Python):
from sys import stdin
import math

n, d = (int(x) for x in stdin.readline().rstrip().split())
print(math.ceil(n/((2*d)+1)))

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

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

Solution (Python):

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

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

print(cnt)

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

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

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

Solution (Python):
import math

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


i = 2 * d + 1

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

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

Solution (Python):
N,D = map(int,input().split())
def ceil(n): 
    if n > int(n):
        return(int(n)+1)
    else:
        return(int(n))
print(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




import sys

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

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

if __name__ == '__main__':
    main()

Solution (Python):

import sys
import math


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



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))  
    print(solve(N, D))

if __name__ == '__main__':
    main()

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

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

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

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

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

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

r = (2 * D + 1)

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

Solution (Python):

N,D = (int(x) for x in input().split())
ans = 0

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

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

can = ((2*D)+1)

ans = 1

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

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

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

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

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

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

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

unit = d *2 + 1

if(n < unit):
  print(1)
elif(n % unit == 0):
  print(int(n/unit))
else:
  print((n//unit)+1)

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

div, mod = divmod(N, 2 * D + 1)
if mod == 0:
    print(div)
else:
    print(div + 1)

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

Solution (Python):
import math

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

print(ans)

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

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

print(ans)

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

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


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

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

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

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

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

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

x=N/(2*D+1)
if x.is_integer()==True:
    print(int(x))
else:
    print(int(x)+1)

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

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

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

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
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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, D = MAP()

te = 1 + D*2

print(ceil(N/te))

Solution (Python):
import sys

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

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

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

Solution (Python):



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

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

d=b*2+1

c=a/d

if c>int(c):
  print(int(c)+1)
else:
  print(int(c))

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

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

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

Solution (Python):



import math


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


if __name__ == "__main__":
    main()

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

Solution (Python):
N, D = map(int, input().split())
d = []
i = 1
while len(d) <= N:
    d += [i]*(D*2+1)
    i += 1
print(len(set(d[:N])))

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

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

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

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

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

Solution (Python):
import math

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

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

a = n % (1 + d * 2)

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

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

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

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

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

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

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

b = 2*D+1
print(ceil(N, b))

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

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

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

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

Solution (Python):
import math
n, d = [int(i) for i in input().split()]
print(math.ceil(n / (d*2+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())
count = 0
c = 0
while count < n:
    count += 2*d+1
    c += 1

print(c)

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().split())
num=2*d+1
cnt=0
mon=0
while True:
  if mon<n:
    mon+=num
    cnt+=1
  else:
    break
print(cnt)

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

area = 2 * D + 1

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

else:
    print(N // area)

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

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

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

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

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

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

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

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

Solution (Python):

import math

import sys
input = sys.stdin.readline


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



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









print(solve(N, D))

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

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=(int(x) for x in input().split())
a=(d*2+1)
if n%a==0:
  print(int(n/a))
else:
  print(int(n/a)+1)

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

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

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