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



Sample input:
6 2


Sample output:
2

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n, d = map(int, input().split())
if n == d:
    print(1)

if (n - (2*d + 1)) <= d:
    print(d)
elif (n - (2*d + 1)) > d:
    print(d -1)

Submission status: Wrong Answer

Solution code:
n ,d = map(int, input().split())
if n == d:
    print(1)
elif (n - 2*d) <= d:
    print(d)
elif (n - 2*d) > d:
     print(d -1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

dd = 2*d + 1

print(n // dd)

Submission status: Wrong Answer

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

r = (d * 2) + 1

for i in range(n):
    if r * i >= n:
        print(i)
        break

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,d = map(int,input().split())
ans = 0

if n -2*d - 1<= 0:
	num = 1
elif (n % (2 * d +1)) == 0:
	ans = int(n / (2 * d +1))
else:
	ans = int(n // (2 * d +1))+1
	
print(ans)

Submission status: Wrong Answer

Solution code:
N,D=map(int,input().split())
ans=N//(2*D)
print(ans)

Submission status: Wrong Answer

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

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

print(result)

Submission status: Wrong Answer

Solution code:
N,D = [int(s) for s in input().split()]
total = 0
count = 0

for i in range(N,0,-1):
  total += (i-D + i+D)
  count += 1
  if total >= N:
    break

print(count)

Submission status: Wrong Answer

Solution code:
import math
n,d=map(int,input().split())
print(math.ceil(math.floor(n//d)/2))

Submission status: Wrong Answer

Solution code:
n,d=map(int,input().split())
print(n//d)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
nd=list(map(int,input().split()))
ans=nd[0]//(2*nd[1]+1)+1
print(ans)

Submission status: Wrong Answer

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

min = 0
count = 1
while (1):
   max = min + 2 * d + 1
   min = max + 1
   if (max >= n):
      break
   count += 1
print(count)

Submission status: Wrong Answer

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

print(math.ceil((N-2)/(D*2)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def 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()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
n, d = map(int, input().strip().split())
ans=math.ceil(n/2/d)
print(ans)

Submission status: Wrong Answer

Solution code:
N, D = [int(i) for i in input().split()]
n = N // D
print((n - (n // 2)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,d = map(int,input().split())
sum1 = d*2+1
ans = n-sum1
cnt=1
i=0
while ans > 0:
    i+=1
    ans=ans-sum1*i
    cnt+=1
print(cnt)

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

Solution code:
tree_num, monitor_distance = [int(x) for x  in input().split()]
hitori = monitor_distance*2 + 1
kazu = tree_num // hitori
if tree_num % monitor_distance == 0:
    print(kazu+1)
else:
    print(kazu)

Submission status: Wrong Answer

Solution code:
tree_num, monitor_distance = [int(x) for x  in input().split()]
hitori = monitor_distance*2 + 1
kazu = tree_num // hitori
print(kazu+1)

Submission status: Wrong Answer

Solution code:
input_list = list(map(int,input().split()))
n = input_list[0]
d = input_list[1]
import math
ans = math.ceil(n/(1+2*d))

Submission status: Wrong Answer

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

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

if cnt == 0:
    print(cnt)
else:
    print(cnt + 1)

Submission status: Wrong Answer

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

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

print(cnt + 1)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
print(A//(2*B+1))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b=map(int, input().split())
i = 1
while(i<a):
    if a - (1+2*b)*i <=0 :
        print(i)
        break
    else:
        i+=1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, D = (int(x) for x in input().split())
X = N / (2 * D + 1)
#print(X)
if (X.is_integer()):
  print(X)
else:
  print(int(X) + 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=list(map(int,input().split()))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,s=map(int,input().split())
print(-(-a//(2*s)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
N,D = map(int,input().split())
#監視員は2D+1本のtreeを見る。
for i in range(1,10):
    N -= (2*D+1)*i
    if N <= 0:
        print(i)
        break

Submission status: Wrong Answer

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

cnt = 0
ans = 0

for i in range(n):
    cnt += 1
    if cnt == d:
        cnt = -d
        ans += 1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,D = map(int,input().split())
for i in range(N):
    if N < D*2*i:
        print(i)
        exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0
for i in range(N):
    if (2*D + 1) * i >= N:
        ans = i
        break
    
print(ans)

Submission status: Wrong Answer

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

ans = 0
for i in range(N):
    if (2*D + 1) * i >= N:
        ans = i
        break
    
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,D=map(int,input().split())
ans=1
while N>0:
    if D % 2 == 0:
        N-=D*2-1
    else:
        N-=D*2+1

    if N>0:
        ans+=1
    
    
    
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

X = D * 2 + 1
Y = 1
Z = 0

while Z == 0:
    if X >= N:
        Z = 1
    else:
        X = X * 2
        Y += 1

print(Y)

Submission status: Wrong Answer

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

import math
print(math.ceil(N / (D + 2)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#ABC134B - Golden Apple
N, D = list(map(int,input().split()))
print(N//(2*D+1)+1)

Submission status: Wrong Answer

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

m =1+D*2

print((N//m)+1)

Submission status: Wrong Answer

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

m =2+D*2

print((N//m)+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math
ns, ds = input().split()
n, d = int(ns), int(ds)

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

s = 0
c = 0
while (s <= a):
  s += 2*b + 1
  c += 1

print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

human = 1
kanshi = 2*D+1

while kanshi < N:
    kanshi = kanshi + kanshi
    human +=1
    
print(human)

Submission status: Wrong Answer

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

human = 1
kanshi = 2*D+1

while kanshi < N:
    kanshi = kanshi*2
    human +=1
    
print(human)

Submission status: Wrong Answer

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

human = 1
kanshi = 2*D+1

while kanshi < N-1:
    kanshi = kanshi*2
    human +=1
    
print(human)

Submission status: Wrong Answer

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

checked = 2*D + 1

print((N+1)//checked + 1)

Submission status: Wrong Answer

Solution code:

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

check = 1 + 2 * d

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

a = 2 * d + 1

if n % a != 0 :
    print(math.ceil(n / a))
else :
    print(n / a)

Submission status: Wrong Answer

Solution code:
n,d = input().split()
N = int(n)
D = int(d)
dis = 0
count = 0
while dis <= N:
    dis += 2*D 
    count += 1
print(count)

Submission status: Wrong Answer

Solution code:
n,d = input().split()
N = int(n)
D = int(d)
dis = 0
count = 0
while dis < N:
    dis += D + D * count
    count += 1
print(count)

Submission status: Wrong Answer

Solution code:
n,d = input().split()
N = int(n)
D = int(d)
dis = 0
count = 0
while dis < N:
    dis += D*2
    count += 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n, m = map(int, input().split())
cover = m*2+1
a = cover - n%cover
print(int((n+a)/cover))

Submission status: Wrong Answer

Solution code:
n, m = map(int, input().split())
cover = m*2+1
print(int(n/cover) + 1)

Submission status: Wrong Answer

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

d = 2 * d + 1
res = n // d + 1

print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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

ans = int(N%(2*D+1))

if ans  == 0:
	print(ans)
else:
	ans += 1
	print(ans)

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())	
print((x//(y*2+1))+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
def func():
    num_apple, index = input('').rstrip().split(' ')
    return math.ceil(int(num_apple) / (2*int(index) + 2))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
num = input().split()
ans = int(num[0]) // (int(num[1])*2+1)
if int(num[0])%int(num[1])!=0: ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
num = input().split()
ans = int(num[0]) // (int(num[1])*2+1)
print(ans+1)

Submission status: Wrong Answer

Solution code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
a,b=map(int,input().split())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#Coding:Utf-8

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

Submission status: Wrong Answer

Solution code:
#Coding:Utf-8

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

Submission status: Wrong Answer

Solution code:
#Coding:Utf-8

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

N, D = map(float,input().split())
d = 2 * D + 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

n, d = 6, 2

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

Submission status: Wrong Answer

Solution code:
import math

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

xrange = 2*d + 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# -*- coding: UTF-8 -*-
import math
n, d = map(int, input().split())
print(math.floor(n/(2*d+1)))

Submission status: Wrong Answer

Solution code:
# -*- coding: UTF-8 -*-
import math
n, d = map(int, input().split())
print(1+(n//(2*d+1)))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, D=map(int,input().split())
int(N/(2*D) + 0.5)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
temp=list(map(int, input().split()))

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

Submission status: Wrong Answer

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

count = 1
i = D+1

while(1):
    if (i+D >= N):
        break
    else:
        count += 1
        i += i+D

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#B - Golden Apple(ABC134)
X=list(map(int, input().split()))

for i in range(X[0]):
    if X[0]<=(X[1]*2+1)*i:
        print(i)
        break

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if D ==0:
    print(N)
for i in range(1,N):
        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

Submission status: Wrong Answer

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

for i in range(1,N):
    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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(1, n+1):
  max = (2*d+1)*i
  #print(str(i)+'人の時に監視できる最大の木の数は', max)
  if n < max:
    ans = i
    break
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

d = 2*D + 1
num = int(N / d)

if (N % d == 0):
  num += 1
  
print(num)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
b=a[0]//a[1]
if a[0]%a[1] == 0:
    pass
else:
    b+=1
print(b)

Submission status: Wrong Answer

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

r = N 
i = 0

"""
r = N - (2 * D + 1)
while r >= N:
    i = i + 1
    r = N - (2 * D + 1)
"""
for k in range(50):
    r = r - (2 * D + 1)
    #print("r = ", r)
    if r < (2 * D + 1):
        i = i + 1
        break
    i = i + 1
    
print(i)

Submission status: Wrong Answer

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

r = N 
i = 0

"""
r = N - (2 * D + 1)
while r >= N:
    i = i + 1
    r = N - (2 * D + 1)
"""
for k in range(50):
    r = r - (2 * D + 1)
    print("r = ", r)
    if r < (2 * D + 1):
        i = i + 1
        break
    i = i + 1
    
print(i)

Submission status: Wrong Answer

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

r = N 
i = 0

r = N - (2 * D + 1)
while r >= N:
    i = i + 1
    r = N - (2 * D + 1)


print(i+1)

Submission status: Wrong Answer

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

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


print(i+1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(int(n/d)+1)

Submission status: Wrong Answer

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

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def p_b():
    n, d = map(int, input().split())
    i = 2 * d + 1
    print((n + i) // i)


if __name__ == '__main__':
    p_b()

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
n,d = list(map(int,input().split()))
print(n//(d * 2 + 1)+1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

I = input()

N = int(I.split()[0])
D = int(I.split()[1])

d = 2*D

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

Submission status: Wrong Answer

Solution code:

I = input()

N = int(I.split()[0])
D = int(I.split()[1])

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
List = list(map(int,input().split()))
N = List[0]
D = List[1]
L = 2 * D
count = 1
while N - L > 0:
    count += 1
    N = N - L
print(count)

Submission status: Wrong Answer

Solution code:
List = list(map(int,input().split()))
N = List[0]
D = List[1]
L = 2 * D
if N - L >= 0:
    if N % L == 0:
        K = int(N / L)
    else:
        K = int(N / L) + 1
else:
    K = 1

print(K)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

c = 0

for i in range(1, n, 2*d+1):
  c += 1
  
print(c)

Submission status: Wrong Answer

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

for i in range(n):
    if n <= (1+d*2)*i:
        print(i)
        exit()

Submission status: Wrong Answer

Solution code:
N, D = map(int, input().split())
result = 1
rang = D*2+1
while rang < N:
    result += 1
    rang *= 2 

print(result)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

q, mod = divmod(a, 2*b+1)

print(a) if mod == 0 else a+1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
num_list = list(map(int, input().split()))

N = num_list[0]
D = num_list[1]

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

Submission status: Wrong Answer

Solution code:
num_list = list(map(int, input().split()))

N = num_list[0]
D = num_list[1]
R = N //(2*D+1)
P = N%(2*D+1)
print (R+P)

Submission status: Wrong Answer

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