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

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

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

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

m = d * 2 + 1

ans = n // m
if n % m != 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

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

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

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

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    n, d = [int(i) for i in input().split()]
    num = n // (d * 2 + 1)
    print(num + (n % (d * 2 + 1) != 0))


if __name__ == "__main__":
    main()

Solution (Python):
import math

x = input()
data = x.split(" ")
print(math.ceil(int(data[0])/(int(data[1])*2+1)))

Solution (Python):
import math

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

kanshi = 2*d + 1

result = math.ceil(n/kanshi)

print(result)

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

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

p = 1+2*d
res = 1
while p < n:
    p += 1+2*d
    res += 1
print(res)

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

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

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

Solution (Python):
import math

s = input().split(' ')
n = int(s[0])
d = int(s[1])

perP = 2 * d + 1
ans = n // perP

if(n % perP == 0):
    print(ans)
else:
    print(ans + 1)

Solution (Python):


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

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

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

print(ans)

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

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

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

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

Solution (Python):

import sys


def solve(N: int, D: int):
    a = (N // (2 * D + 1))
    b = (N % (2 * D + 1))
    if b is not 0:
        a = a+1
    print(a)
    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())
if n < 2*d:
  print(1)
elif n % (2*d +1) == 0:
  print(n // (2*d + 1))
else:
  ans = n // (2*d + 1) + 1
  print(ans)

Solution (Python):
N, D = map(int, input().split()) 
for s in range(20):
  if (D*2+1)*s<N and (D*2+1)*(s+1)>N:
    print(s+1)
  if (D*2+1)*s==N:
    print (s)

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

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

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

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

Solution (Python):
import math

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

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

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

Solution (Python):
import math

n,d= map(int, input().split())
tmp=(d*2)+1

result=math.ceil(n / tmp)
print(result)

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 sys
import math

def solve(n, d):
    return int(math.ceil(float(n) / (2 * d + 1)))


if __name__ == '__main__':

    n, d = map(int, sys.stdin.readline().strip().split(" "))
    print solve(n, d)

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

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

Solution (Python):
def solve(n: int, d: int):
  c = 0
  while n > 0:
    n -= 2 * d + 1
    c += 1
  print(c)

if __name__ == '__main__':
  n, d = [int(k) for k in input().split()]
  solve(n, d)

Solution (Python):
n,d=map(int,input().split())
l=d+1
r=n-d
if l==r:
    print(1)
else:
    ans=1
    k=l
    while k<r:
        k+=2*d+1
        ans+=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(int(b))
else:
  print(int(b+1))

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

for i in range(1, n+1):
    if count == 0:
        if i - d == 1:
            count += 1
    else:
        count2 += 1
        if count2 == d*2+1:
            count += 1
            count2 = 0

if count2 >= d+1:
  count += 1
if n <= d:
  count += 1

print(count)

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

r = 0
f = 0
k = a

while f == 0:
    k = k - (b * 2 + 1)
    r += 1
    if k < 1:
        f = 1

print(r)

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 math

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

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

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

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


tmp = D + D + 1
condition = tmp
cnt = 1
while N > condition:
    condition +=tmp
    
    cnt+=1

print(cnt)

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

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

Solution (Python):
def main():
    nums = input().split()
    n = int(nums[0])
    d = int(nums[1])
    itr = 0
    kanshi = 0
    while kanshi < n:
        kanshi += d + d + 1
        itr += 1
    print(itr)


if __name__ == "__main__":
    main()

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

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

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

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

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

else:
    print(a + 1)

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

Solution (Python):
N,D=(int(x) for x in input().split())
a=D+1
count=1
if(a+D<N):
    N-=D
    count+=1
while(a<N):
    a+=(2*D+1)
    if(a<N):
        count+=1

print(count)

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

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

C=0
X=D*2+1
C=N//X
if N%X != 0:
	C+=1

print(C)

Solution (Python):

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

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

def people(t):
    t = t + 2*D
    return t
if N<D:
    print(1)

else:
    t = 1
    c = 0
    while t <= N:
        
        t = people(t+1)
        c+=1
    print(c)

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

Solution (Python):
N = map(int,raw_input().split())
for i in range(10):
        A =N[0]-(N[1]*2+1)*i
        if A <= 0:
                print(i)
                exit()
        else:
                pass

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

num = 1
while True:
    if (2*d+1)*num >= n:
        print(num)
        break
    else:
        num +=1

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

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

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

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

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 = [int(i) for i in input().split()]

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

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())
i = 1+d
cnt = 1
while n>0:
    check = i+d
    if(i>=n or check>=n):
        break
    i = check+1+d
    cnt += 1

print(cnt)

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

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

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

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

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

t = d*2+1

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

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

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

temp = 2*D + 1

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

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

quotient, remainder = divmod(N, (2 * D + 1))

answer = quotient if (remainder == 0) else quotient + 1

print(answer)

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

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

Solution (Python):
args = input().split()
N = int(args[0])
D = int(args[1])

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

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

Solution (Python):
from math import ceil
data = [int(x) for x in input().split(" ")]
print(ceil(data[0]/(data[1]*2 +1)))

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

t = (2*d+1)

if n%t:
  print((n // t) + 1)

else:
  print(n//t)

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

ans = 0
num = 0

while num < N:
	num += 2*D+1
	ans += 1
		
print(ans)

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

q = N // (2 * D + 1)
p = N % (2 * D + 1)

if p != 0:
    print(q + 1)
else:
    print(q)

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

ans = n / (d*2 + 1)

print(math.ceil(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):
import math

N, D = input().split()

n = int(N)
d = int(D)

check = 2 * d + 1

print(math.ceil(n/check))

Solution (Python):

import sys
from operator import itemgetter
from fractions import gcd
from math import ceil, floor, sqrt
from copy import deepcopy
from collections import Counter, deque, defaultdict
import heapq
from functools import reduce
sys.setrecursionlimit(200000)
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())
def debug(*args, sep=" ", end="\n"): print("debug:", *args, file=sys.stderr, sep=sep, end=end) if not __debug__ else None
def exit(*arg): print(*arg); sys.exit()


def main():
    N, D = mi()
    print(ceil(N / (2 * D + 1)))

if __name__ == '__main__':
    main()

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

Solution (Python):


n,d = [int(c) for c in 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())
i = 0

while i * (2*d+1) < n:
    i += 1

print(i)

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

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

Solution (Python):
N, D = map(int, input().split())
count = 0
guard = 1
while guard <= N:
    guard += (D * 2) 
    if guard <= N:
        count += 1
        guard += 1
    else:
        if N - guard < D:
            count += 1
        print(count)
        exit()
print(count)

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

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

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

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

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

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

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

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


if __name__ == '__main__':
  main()

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

count = 0

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

print(count)

Solution (Python):
import math

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

main()

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())
count = 0
while N > 0:
    if N <= 2 * D + 1 and N > 0:
        count += 1 
        break
    N = N - 2 * (2 * D + 1)
    count += 2
print(count)

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

Solution (Python):
import math

n, d = map(int, input().split())
print("{}".format(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):
from sys import stdin
from math import ceil
readline = stdin.readline


def nl():
    """
    空白区切り行入力を`int iter`に変換
    """
    return map(int, readline().split())


def main():
    n, d = nl()
    res = ceil(n / (d * 2 + 1))
    print(res)


if __name__ == "__main__":
    main()

Solution (Python):
def resolve():
    n, d = map(int, input().split())
    
    
    print('{}'.format(-(-n // (2 * d + 1))))
    
resolve()

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

Solution (Python):
import sys

n, d = tuple(map(int, sys.stdin.readline().strip().split()))
a = n // (2 * d + 1)
b = n % (2 * d + 1)
if b == 0:
  print(a)
else:
  print(a + 1)

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

h = 2 * d + 1

if (n % h==0):
    ans = n // h
else:
    ans = n // h +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=list(map(int,input().split()))
N=n[0]
D=n[1]

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

Solution (Python):
import math
p=input().rstrip().split(' ')
n=int(p[0])
d=int(p[1])
A=d*2+1;
print(math.ceil(n/A))

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

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

Solution (Python):



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

Solution (Python):
a=[]
for x in input().split(" "):
    a.append(int(x))

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

Solution (Python):


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

    
if __name__=='__main__':
    main()

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

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

Solution (Python):
import math

def main():
  tree_cnt, view_distance = map(int, (input().split()))
  tmp = 1 + view_distance * 2
  result = math.ceil(tree_cnt / tmp)
  print(result)

    
main()

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

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

Solution (Python):
from sys import stdin
import math


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

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


if __name__ == "__main__":
    main()

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

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

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

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

Solution (Python):
import math



def main():
    N, D = list(map(int, input().split(" ")))
    right_cover = 0
    left_cover = N+1
    count = 0
    while(True):
        
        right_cover = right_cover + 2*D + 1
        count = count + 1

        if right_cover >= N or right_cover >= left_cover - 1:
            break

        
        left_cover = left_cover - (2*D + 1)
        count = count + 1

        if left_cover <= right_cover + 1:
            break
    print(count)

if __name__ == '__main__':
    main()

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

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

print(k)

Solution (Python):
import numpy as np
l = input().split()
n = int(l[0])
d = int(l[1])
a = np.ceil(n / (2 * d +1))
print(int(a))

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

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

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

area = 2*D + 1
result, extra = N // area, N % area

if extra > 0:
    print(result + 1)
else:
    print(result)

Solution (Python):



def solv(n, d):
    ll = d * 2 + 1
    ans = (n + ll - 1) // ll
    return ans


if __name__ == '__main__':

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

    ans = solv(n, d)

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

Solution (Python):
n,d=list(map(int,input().split(" ")))
t=n//(2*d+1)
s=bool(n % (2*d+1))
ans=t*(not s)+(t+1)*(s)
print(ans)

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

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

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

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

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

ans = 0
while ans * D < N: ans += 1
print ans

Solution (Python):
import math

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

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

print(bord)

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

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

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

print(ans)

Solution (Python):
i = input().split()
N = int(i[0])
D = int(i[1])
idx = D+1
x = idx + D
if (N % x == 0):
    print (N//x)
else:
    print(N//x + 1)

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

Solution (Python):




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


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

if n % wk > 0:
    ans = ans + 1


print(ans)

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

def SORO_INT(): return int(INPUT())
def MULT_INT_LIST(): return list(map(int, INPUT().split()))
def MULT_INT_MAP(): return map(int, INPUT().split())
def SORO_STRING(): return INPUT()
def MULT_STRING(): return INPUT().split()

N,D = MULT_INT_MAP()
x = D*2+1
y = N/x


def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False

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

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

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

Solution (Python):
import math
input_data = input().split()
N = int(input_data[0])
D = int(input_data[1])
tmp_answer = N / (2*D+1)

answer = math.ceil(tmp_answer)
print (answer)

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 = map(int, input().split())
ansB = True
iMinT = D + 1
iMaxT = iMinT + D
ansCnt = 1
while ansB:
    if N <= iMaxT:
        break

    iMinT = iMaxT + D + 1
    iMaxT = iMinT + D
    ansCnt += 1

print(ansCnt)

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

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

i = 2 * d
c = 0
a = 0
while a < n:
    a += i + 1
    c += 1
print(c)

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

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

ovserved_range = D*2 + 1

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

Solution (Python):
import math

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


see = D*2+1


print(math.ceil(N/see))

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

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

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

range_data = 2 * d + 1
count = 0

while(n > 0):
    n = n - range_data
    count += 1

print(count)

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

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

r=D*2 + 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

print(math.ceil(N/a))

Solution (Python):
import sys


		
def main():
	n, d = map(int, input().split())
	nn=n
	cc=0
	while nn > 0:
		cc+=1
		nn+=-1*(1+2*d)
	print(cc)
	
	


if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
	else:
		input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Solution (Python):
import math

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

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

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

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

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

e = D * 2 + 1
m = N % e

if m > 0:
    print((N // e) + 1)
else:
    print(N // e)

Solution (Python):
N, D = map(int, input().split())
count = 0
num = 1
while num <= N:
    a = num+D
    A = a + D
    num = A+1
    count += 1
print(count)

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:
    ans += 1
print(ans)

Solution (Python):
import numpy as np
from collections import defaultdict
from heapq import heappush, heappop
from math import ceil


def djkstra_adj_list(adj_list, src):
    dist = defaultdict(lambda: np.inf)
    dist[src] = 0

    prev = defaultdict(lambda: None)

    queue = []
    heappush(queue, (dist[src], src))

    while len(queue) > 0:
        dist_u, u = heappop(queue)
        vs = adj_list[u]
        for v, weight in vs:
            alt = dist_u + weight
            if alt < dist[v]:
                dist[v] = alt
                prev[v] = u
                heappush(queue, (alt, v))

    return dist, prev


def djkstra_adj_mat(adj_mat, src):
    dist = defaultdict(lambda: np.inf)
    dist[src] = 0

    prev = defaultdict(lambda: None)

    queue = []
    heappush(queue, (dist[src], src))

    while len(queue) > 0:
        dist_u, u = heappop(queue)
        vs = np.argwhere(adj_mat[u] > 0).flatten()
        for v in vs:
            weight = adj_mat[u, v]
            alt = dist_u + weight
            if alt < dist[v]:
                dist[v] = alt
                prev[v] = u
                heappush(queue, (alt, v))

    return dist, prev


def main():

    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)
    



if __name__ == '__main__':
    main()

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

Solution (Python):
import math

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

range_kansi = 1 + D*2 

print(str(math.ceil(N / range_kansi)))

Solution (Python):
import numpy as np


a = list(map(int, input().split()))

N = a[0]
D = a[1]


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

print(int(ans))

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

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

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

tmp = 2*b+1

if a % tmp == 0:
	ans = a / tmp
	print(int(ans))
else:
	ans = a / tmp + 1
	print(int(ans))

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

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

dd = d*2+1

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

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

for i in range(1, n):
  if n <= capacity * i:
    min = i
    break
print(min)

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

Solution (Python):
import numpy as np
def acinput():
    return list(map(int,input().split(" ")))


N,D=acinput()

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

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

Solution (Python):

import math

def GoldenApple(tree_num, watch_range):
    print(math.ceil(tree_num/(2*watch_range+1)))

if __name__ == "__main__":
    [N,D] = list(map(int,input().split(" ")));
    GoldenApple(N,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())

NoOfman = 0
vision = 2*D+1

while(1):
    NoOfman += 1
    N -= vision
    if N<=0:
        break

print(NoOfman)

Solution (Python):


from math import ceil,floor









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

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