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

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

Solution (Python):
n, d = list(map(int, input().split(' ')))
now = 0
ans = 0

while now < n:
    ans += 1
    now += 2 * d + 1

print(ans)

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

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

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

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

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

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(int((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)+1)
else:
    print(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):
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):
num = input().split()
ans = int(num[0]) // (int(num[1])*2+1)
if int(num[0])%(int(num[1])*2+1)!=0: ans += 1
print(ans)

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

Solution (Python):
import math

def main(): 

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

    dp = d*2 + 1

    print(math.ceil(n / dp))

if __name__ == "__main__":
    main()

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

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

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

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

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

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

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

moniter = D+(D+1)
print(math.ceil(N / moniter))

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

Solution (Python):

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

Solution (Python):


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

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

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

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

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

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

Solution (Python):
import sys
from collections import defaultdict
from heapq import *
sys.setrecursionlimit(10**8)

input = sys.stdin.readline

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

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

Solution (Python):
x,y = map(int,input().split())
i=0
while x>0:
  i+=1
  x = x-(2*y+1)
print(i)

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

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

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

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

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

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

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

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

Solution (Python):
import math

if __name__ == '__main__':
    N, D = map(int, input().split())
    observ_area = (2 * D) + 1
    observers = math.ceil(N / observ_area)
    print(observers)

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

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

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

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

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

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

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

if 2 * d >= n - 1:
    print(1)
    exit()
cnt = 1
wide = 2*d
while(wide < n - 1):
    cnt += 1
    wide += 2 * d + 1
print(cnt)

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

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 = 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, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


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


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



def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2



def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)



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


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


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):


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

import numpy as	np

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

print(ans)

Solution (Python):
from math import ceil

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

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n, d = list(map(int, input().rstrip('\n').split()))
    print((n + d * 2) // (d * 2 + 1))


if __name__ == '__main__':
    slove()

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

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

Solution (Python):

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

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

Solution (Python):
N, D = list(int(num) for num in input().split(' '))

i=1

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

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

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

print(ans)

Solution (Python):
import sys
import math
from copy import deepcopy
from collections import deque
sys.setrecursionlimit(20000000)


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

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

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


if __name__ == '__main__':
    main()

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

Solution (Python):
import math

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

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

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

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

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

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

r = d * 2 + 1

ob1, ob2 = divmod(n, r)

if ob2 > 0:
	ob1 += 1

print(ob1)

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

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

print(math.ceil(a[0] / ( 2 * a[1] + 1)))

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

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

wch = 2*b + 1
if a%wch == 0:
    print(int(a/wch))
    exit()
print(a//wch+1)

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

Solution (Python):

import sys
from math import ceil

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

if n[0]%(n[1]*2+1) > 0:
  i = 1
else:
  i = 0

print(int( n[0]//(n[1]*2+1) )+i)

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

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

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

Solution (Python):

import sys
from math import ceil

def solve(N: int, D: int):
    print(ceil(N/(2*D+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())
L = 2*D+1
a = (N + L -1)/L
print(int(a))

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

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

Solution (Python):
import math

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

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

n, d = na()
id = d * 2 + 1
print(n // id if n % id == 0 else n // id + 1)

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

Solution (Python):
from sys import stdin

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

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

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

Solution (Python):


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


me = 2 * D + 1


ans = 0

while True:
    ans += 1
    N = N - me
    if N <= 0:
        break

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().strip().split(' '))
area = 2*D+1
print((N+area-1)//area)

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
inf=float('inf')
mod = 10**9+7
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N,D = MI()
    M = 2*D + 1
    print(ceil(N/M))
if __name__ == '__main__':
    main()

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

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

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

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

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

Solution (Python):
import math

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

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

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

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

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

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

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

Solution (Python):
import math

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

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

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

Solution (Python):
import math

inputs = [int(x) for x in input().split()]
n, d = inputs[0], inputs[1]

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//(d+d+1)+(n%(d+d+1)>0))

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

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

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

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

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

x = 2 * D + 1

ans = 1
while True:
    if ans * x >= N:
        break
    ans += 1

print(ans)

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

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

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

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

e = d*2+1

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

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

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

Solution (Python):

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

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

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

Solution (Python):
N,D = list(map(int,input().split()))
a = 2*D+1
cnt = 0

while N > a*cnt :
    cnt += 1
    if N < a*cnt :
        break

print(cnt)

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

Solution (Python):
import math


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


if __name__ == "__main__":
    solve()

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

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

Solution (Python):
import math


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

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

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

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

while N>0:
  counter += 1
  N -= 1+(2*D)
  
print(counter)

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

Solution (Python):

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

can_see = 2*D+1

number = 0

number =int( N / can_see)

if (N % can_see != 0):
    number += 1
print(number)

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

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

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

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

    
    

    
    
    
    
    

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


main()

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

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

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

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

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

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


if __name__ == "__main__":
    test()

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

if N % l == 0:
    ans = N // l
else:
    ans = N // l + 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())
i = 1
cnt = 1
while (2*d+1)*i < n:
  cnt += 1
  i += 1
print(cnt)

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

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

Solution (Python):
import sys
from collections import deque

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    [N, D] = string_to_int(inputs[0])
    counter = -D
    num_person = 0
    is_just_increase = False
    for i in range(N):
        is_just_increase = False
        if counter == D:
            counter = -D
            num_person += 1
            is_just_increase = True
        else:
            counter += 1
    if not is_just_increase:
        num_person += 1
    return num_person


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Solution (Python):
n,d = 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())
visible_range = 2 * D + 1
print(-(-N//visible_range))

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

Solution (Python):
import math 

list1=[int(i) for i in input().split()]
N = list1[0]
D = list1[1]

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

Solution (Python):
from math import ceil

def solve(a:int, b:int):
    print(ceil(a/(b*2+1)))

def main():
    a, b = map(int, input().split(" "))
    solve(a, b)

if __name__ == "__main__":
    main()

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

if temp-int(temp)>0:
  print(int(temp+1))
else:
  print(int(temp))

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

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

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

Solution (Python):
input_data = input().split(" ")

N = int(input_data[0])
D = int(input_data[1])
cnt = 0
tree = [i+1 for i in range(N)]

while tree != []:
  if len(tree) > 2*D:
    del tree[0: 2*D+1]
    cnt += 1
  else:
    del tree[0:]
    cnt += 1
    
print(cnt)

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

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

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

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

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

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

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

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

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

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

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

print(ans)

Solution (Python):
import math

a,b = [int(x) for x in input().split()]

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

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

print(count)

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

Solution (Python):
import sys
import numpy as np

def input():
	return sys.stdin.readline().rstrip()
def main():
	N, D = (map(int, input().split()))
	if N % (D * 2 + 1) == 0:
		ans = 0
	else:
		ans = 1
	ans = ans + N//(D * 2 + 1)
	print(ans)
if __name__ == '__main__':
	main()

Solution (Python):
def f(x,y):
    a=2*y+1
    b=x//a
    c=x%a
    if c==0:
        return b
    else:
        return b+1
xy=input().split(" ")
N=int(xy[0])
D=int(xy[1])
print(f(N,D))

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

n = 2 * D + 1

ans = - (-N // n)
print(ans)

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

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

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

Solution (Python):

X=list(map(int, input().split()))
for i in range(X[0]+1):
    if X[0]<=(X[1]*2+1)*i:
        print(i)
        break

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

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

if D ==0:
    print(N)
for i in range(1,N+1):
        P=N//(i*(2*D+1))
        L=N%(i*(2*D+1))
        if P < 1:
            print(i)
            break
        elif P == 1 and L == 0:
            print(i)
            break

Solution (Python):
l = list(map(int,input().split()))
n = l[0]
d = l[1]

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

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

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

Solution (Python):
import glob
import math



REL_PATH = 'ABC\\134\\B'


TOP_PATH = 'C:\\AtCoder'


class Common:

    problem = []
    index = 0

    def __init__(self, rel_path):
        self.rel_path = rel_path

    def initialize(self, path):
        file = open(path)
        self.problem = file.readlines()
        self.index = 0
        return

    def input_data(self):
        try:
            IS_TEST
            self.index += 1
            return self.problem[self.index-1]

        except NameError:
            return input()

    def resolve(self):
        pass

    def exec_resolve(self):
        try:
            IS_TEST
            for path in glob.glob(TOP_PATH + '\\' + self.rel_path + '/*.txt'):
                print("Test: " + path)
                self.initialize(path)
                self.resolve()
                print("\n\n")
        except NameError:
            self.resolve()


class B(Common):

    def resolve(self):

        tmp = [int(i) for i in self.input_data().split()]
        tree_num = int(tmp[0])
        D = int(tmp[1])

        result = math.ceil(tree_num / (2 * D + 1))
        print(str(result))

solver = B(REL_PATH)
solver.exec_resolve()

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

Solution (Python):
import math

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

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

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

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

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

for i in range(1, n+1):
  max = (2*d+1)*i
  
  if n  <= max:
    ans = i
    break
print(ans)

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

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

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

Solution (Python):
import math

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

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

Solution (Python):
import math

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

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