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

Submission status: Wrong Answer

Solution code:
import math
A = list(map(int, input().split()))
print(int(math.ceil(A[0]/(2*A[1]))))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(n):
    a = n- i*(2*d+1)
    if a<=0:
        ct = i
        break


print(ct)

Submission status: Wrong Answer

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

for i in range(n):
    a = n- i*(2*d+1)
    ct +=1
    if a<=0:
        break

print(ct)

Submission status: Wrong Answer

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

for i in range(n):
    a = n- i*(2*d+1)
    if a<=0:
        print(i)
        break

Submission status: Wrong Answer

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

for i in range(n):
    a = n- i*(2*d)
    if a<=0:
        print(i)
        break

Submission status: Wrong Answer

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

for i in range(n):
    a = n- i*(2*d+1)
    if a<=0:
        print(i)
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
input_data=input()
input_data=input_data.split()
N=int(input_data[0])
D=int(input_data[1])

x=N/(2*D+1)
a=type(x)
if  a==float:
    output=int(x)+1
else :
    output=x

print(output)

Submission status: Wrong Answer

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

hani = d*2 + 1

ans = int(n/hani)

print(ans)

Submission status: Wrong Answer

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

ans=(n/(d*2))
ansint =int(n/(d*2))

if(ansint - ans >= 0.5):
  ansint = ansint + 1

print(ansint)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
"""
- https://atcoder.jp/contests/abc134/tasks/abc134_b
"""
n, d = map(int, input().split())
div = (n-2)//(2*d)
ans = div if (n-2)%(2*d)==0  else div+1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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:
s = input().split()
n = int(s[0])
d = int(s[1])
drange = d * 2
num = 0
for i in range(10):
  num += 1
  n -= drange
  if n < 0:
    print(num)
    break

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

if (2*d+1) > n:
  print(1)
else:
  print(-(-n // (2*d+1))+1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
c = a//(b+1)
if c << 3:
    c = 1
print(c)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
c = a//b
if c << 3:
    c = 1
print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

d_look = 2 * d + 1

print(int(n/d_look)+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,d = (int(x) for x in input().split())
print(round(n/(2*d)))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-
A = list(map(int,input().split()))

judge = 0
remain = A[0]

for i in range(A[0]):
	remain -= 2*A[1] + i + 1
	if remain <= 0:
		judge = i + 1 
		break
print(judge)

Submission status: Wrong Answer

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

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 = 0
for i in range(n):
    if (2*d + 1) * i >= n:
        print(i)
        break
    ans += 1

Submission status: Wrong Answer

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

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

print(p)

Submission status: Wrong Answer

Solution code:
s=list(map(int,input().split()))
a=0
b=s[0]
i=0
j=0
for i in range(s[0]):
  if b>=0:
    b=b-1-s[1]*2
    j=j+1
  else:
    break
print(j)

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

Submission status: Wrong Answer

Solution code:
import math

#n = int(input())
a, b = [int(i) for i in input().split()]
#table = [[int(i) for i in input().split()] for j in range(n)]
#table = [list(input()) for n in range(h)]
#list = [int(i) for i in input().split()]
#num = [int(i) for i in range(n)]
#s = input()
#list = list(s)
#temp = [[0 for _ in range(13)] for _ in range(13)]

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-
import math

def solve():
    N, D = list(map(int, input().split()))
    print(math.ceil(N/(D+1)))

if __name__ == "__main__":
    solve()

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

Submission status: Wrong Answer

Solution code:

def main():

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

    power = D*2+1

    if N <= power:
        print(1)
        exit()

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



if __name__== "__main__":
    main()

Submission status: Wrong Answer

Solution code:

def main():

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

    power = D*2+1

    if N <= power:
        print(1)

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



if __name__== "__main__":
    main()

Submission status: Wrong Answer

Solution code:

def main():

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

    if N < D:
        N=D

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



if __name__== "__main__":
    main()

Submission status: Wrong Answer

Solution code:

def main():

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

    if N < D:
        N=D

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



if __name__== "__main__":
    main()

Submission status: Wrong Answer

Solution code:

def main():

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

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



if __name__== "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

p=1
i1=1+D
i2=N-D
if i2>0:
    p = 2

i3=i2-i1

while i3 > 2*D+1:
    p = p + 1
    i3 = i3 - D

print(p)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

z=2*D+1
while N>z:
  z=z+1

print(z)

Submission status: Wrong Answer

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

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

if ans-int_ans!=0:
    ans+=1

print(int(ans))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, D = map(int, input().split())
a = N // (D + 1)
if N % (D + 1) > 0:
    a -= 1
print(a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n, d = map(int, input().split())
while True:
    c = int(n / (2*d))
    if n % (2*d) < d:
        break
    else:
        c += 1
        break
print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
ND = input()
N,D = [int(i) for i in ND.split(" ")]
D_2 = D*2

cnt = 1
while(1):
    if (D_2 * cnt) >= N:
        print(cnt)
        break
    cnt += 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,d=map(int,input().split())
count=0
init=d+1
res=d+1
i=2
while(res<=n):
	count=count+1
	res=init*i
	i=i+2
if(count==0):
    print(count+1)
else:
	print(count)

Submission status: Wrong Answer

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

a = nd[0] // (nd[1]*2)

if (nd[0]%(nd[1]*2)) != 0:
    a += 1

print(a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=(int(x) for x in input().split())

c = a//(2*b+1)

print(c+1)

Submission status: Wrong Answer

Solution code:
a,b=(int(x) for x in input().split())

c = a//b

print(c+1)

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

Submission status: Wrong Answer

Solution code:
n,d = (int(i) for i in input().split())

d = d*2 +1
d = d*2
q = n//d
mod = n % d
ans = q
if mod != 0:
    ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
n,d = (int(i) for i in input().split())

d = d*2
q = n//d
mod = n % d
ans = q
if mod != 0:
    ans += 1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

S = input()

S = S.split()

N = int(S[0])
D = int(S[1])

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

syou=N//D
amari=N%D

if amari != 0:
  syou=syou+1

print(syou)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split());
l=int(n/(2*m+1));
if(n/(2*m+1)!=0):
    l+=1;
print(l);

Submission status: Wrong Answer

Solution code:
input_line = input().split(" ")
N = int(input_line[0])
D = int(input_line[1])
if(N%(2*D+1) == 0):
    print(int(N/(2*D+1)))
else:
    print(N//(2*D)+1)

Submission status: Wrong Answer

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

n=1
while N>2*n+1:
  n=n+1

print(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main11():
    data = input().split()
    num = []
    for i in range(2):
        num.append(int(data[i]))
    result = int(num[0] / (num[1] * 2 + 1))
    if (num[0] / (num[1] * 2 + 1)) != 0:
        result = result + 1
    print(result)

if __name__ == "__main__":
    main11()

Submission status: Wrong Answer

Solution code:
def main11():
    data = input().split()
    num = []
    for i in range(2):
        num.append(int(data[i]))
    result = int(num[0] / (num[1] * 2 + 1))
    print(result)

if __name__ == "__main__":
    main11()

Submission status: Wrong Answer

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

d, m = divmod(N, 2 * D + 1)
print(d, m)
if m != 0:
    d += 1
print(d)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

import math
 
N, D = list(map(int, input().strip().split(" ")))
 
if D == 0:
    print(N)
elif N == 0:
    print("0")
else:
	print( int(math.ceil(N / (2 * D))))

Submission status: Wrong Answer

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

if D == 0:
    print(N)
else:
	print( int(math.ceil(N / (2 * D))))

Submission status: Wrong Answer

Solution code:
import math

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

print(N)
print(D)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print( N // (2 * D))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main(num_tree, wide_tree):
    count =1 
    if (num_tree%2)==0 :
        for i in range(num_tree//wide_tree):
            count += 1
    else:
        for i in range(num_tree//wide_tree):
            count += 1    
    return int(round(count/2))

if __name__ == '__main__':
    s = list(map(int, input().split()))
    if (1 <= s[0] <= 20) and (1 <= s[1] <= 20) :
        huga = main(s[0],s[1])
    print(huga)

Submission status: Wrong Answer

Solution code:
def main(num_tree, wide_tree):
    count =1 
    if (num_tree%2)==0 :
        for i in range(num_tree//wide_tree):
            count += 1
        return int(count/2)
    else:
        for i in range(num_tree//wide_tree):
            count += 1    
        return int(count/2)

if __name__ == '__main__':
    s = list(map(int, input().split()))
    if (1 <= s[0] <= 20) and (1 <= s[1] <= 20) :
        huga = main(s[0],s[1])
    print(huga)

Submission status: Wrong Answer

Solution code:
def main(num_tree, wide_tree):
    count =1 
    if (num_tree%2)==0 :
        for i in range(round(num_tree//wide_tree)):
            count += 1
        return int(count/2)
    else:
        while (round(num_tree/2) - count*wide_tree) > 0:
            count += 1    
        return count

if __name__ == '__main__':
    s = list(map(int, input().split()))
    if (1 <= s[0] <= 20) and (1 <= s[1] <= 20) :
        huga = main(s[0],s[1])
    print(huga)

Submission status: Wrong Answer

Solution code:
def main(num_tree, wide_tree):
    count =1 
    if (num_tree%2)==0 :
        while ((num_tree/2) - count*wide_tree) > 0:
            count += 1
            if ((num_tree/2) - count*wide_tree) == 1:
                count += 1
        return count
    else:
        while (round(num_tree/2) - count*wide_tree) > 0:
            count += 1    
        return count

if __name__ == '__main__':
    s = list(map(int, input().split()))
    if (1 <= s[0] <= 20) and (1 <= s[1] <= 20) :
        huga = main(s[0],s[1])
    print(huga)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

x = 2*D+1
y = N/x
z = N//x
if N/x==0:
    print(y)
else:
    print(z+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:
import math
N,D = map(int,input().split())
print(math.floor(N/(2*D)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
nd=input()
ndlis=['' for i in range(2)]
ndlis=nd.split()
n=int(ndlis[0])
d=int(ndlis[1])
on=0
cnt=0
while on==0:
	cnt=cnt+1
	if n<=cnt*(d*2):
		on=1
print(cnt)

Submission status: Wrong Answer

Solution code:
nd=input()
ndlis=['' for i in range(2)]
ndlis=nd.split()
n=int(ndlis[0])
d=int(ndlis[1])
on=0
cnt=0
while on==0:
	cnt=cnt+1
	if n<=cnt*d:
		on=1
print(cnt)

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

Submission status: Wrong Answer

Solution code:
def main(n,d):
  return n/(2*d)+1

Submission status: Wrong Answer

Solution code:
def main(n,d):
  return n/d+1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, D = [int(z) for z in input().split()]
out = N//(2*D+1)
if out * (2*D+1) == N:
  out = out + 1
print(out)

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

Submission status: Wrong Answer

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

if x.is_integer():
    print( x//1 )
else:
    print( (x//1) + 1 )

Submission status: Wrong Answer

Solution code:
n, d = [ int(_) for _ in input().split() ]
x  = n / (2*d+1)
if x.is_integer():
    print( x )
else:
    print( x + 1 )

Submission status: Wrong Answer

Solution code:
n, d = [ int(_) for _ in input().split() ]
x  = n // (2*d+1)
if x%2 ==0:
    print( x )
else:
    print( x + 1 )

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c=b
n=0
if 1+c+c >= a:
    n=n+1
    print(n)
if 1+c+c < a:
    n=n+2
    if 2*(1+c+c) >= a:
        print(n)
    if 2*(1+c+c) < a:
        n=n+1
        print(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,D=[int(x) for x in input().split()]
if( N/D < N- D*2):
 print(int(N/D)) 
else:
 print(int(N/D)+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, D = map(int, input().split())
print(round(N / (D * 2 + 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]=[int(i) for i in input().split()]
a=2*D+1
b=N//a
print(b)

Submission status: Wrong Answer

Solution code:
temp = input().split()
N=int(temp[0])
print(N)
D=int(temp[1])
print(D)
can_read=2*D+1
cnt=0
while(N>0):
    N=N-can_read
    cnt=cnt+1
print(cnt)

Submission status: Wrong Answer

Solution code:
try:
    temp = input().split()
    N=int(temp[0])
    print(N)
    D=int(temp[1])
    print(D)
    can_read=2*D+1
    cnt=0
    while(N>0):
        N=N-can_read
        cnt=cnt+1
    print(cnt)
except ValueError:
    print("input miss")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

man=d*2+1

cnt=1
while True:
    if n>man:
        cnt+=1
        man=2*man

    elif man>=n:
        break
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if(n<=((i*2)+1)):
  print("1")
else:
  a=n-(n%((i*2)+1))
  print(int(1+a/((i*2)+1)))

Submission status: Wrong Answer

Solution code:
try:
    temp = input().split()
    N=int(temp[0])
    D=int(temp[1])
    can_read=2*D+1
    cnt=0
    while(N>=0):
        N=N-can_read
        cnt=cnt+1
    print(cnt-1)
except ValueError:
    print("input miss")

Submission status: Wrong Answer

Solution code:
N,D = map(int,input().split())
i = 0
left = 1
right = N
while 1:
    left += D
    right -= D
    if left > right:
       left -= D
       right +=D
       if abs(right-left) > 1:
            ans = 3
       else: 
           ans = 2
       break
print(ans)

Submission status: Wrong Answer

Solution code:
n, d = [ int(_) for _ in input().split() ]
temp  = n // (2*d)
if temp%2 ==0:
    print(temp)
else:
    print( temp + 1 )

Submission status: Wrong Answer

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