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: Accepted

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

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

Submission status: Accepted

Solution code:
import math


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = 0

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

print(ans)

Submission status: Accepted

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

count = 1 

while (count * (D * 2 + 1)) < N:
  count += 1

print(count)

Submission status: Accepted

Solution code:
import math

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

aaa = (D*2)+1

print(math.ceil(N/aaa))

Submission status: Accepted

Solution code:
A=list(map(int,input().split()))
for i in range(20):
    if (A[1]*2+1)*i<A[0]:
        continue
    else:
        ans=i
        break
print(ans)

Submission status: Accepted

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

if int(N / (2*D+1)) < N/(2*D+1):
  ans = int(N / (2*D+1) +1)
else:
  ans = int(N / (2*D+1))
  
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC 134: B – Golden Apple
n, d = [int(s) for s in input().split()]
print(n // (d * 2 + 1) if n % (d * 2 + 1) == 0 else n // (d * 2 + 1) + 1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, d=input().split()
ni=int(n)
di=int(d)
cnt=1
while True:
  if (2*di+1)*cnt>=ni:
    print(cnt)
    break
  
  cnt+=1

Submission status: Accepted

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

Submission status: Accepted

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

ans = int(ans)
print(ans)

Submission status: Accepted

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

print(int(ans))

Submission status: Accepted

Solution code:
# 2019-11-15 14:12:24(JST)
import sys
# import collections
import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# from scipy.misc import comb # float
# import numpy as np 

def main():
    n, d = [int(x) for x in sys.stdin.readline().split()]
    ran = 1 + d * 2
    number = math.ceil(n / ran)
    print(number)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

count = 0
range = 2*D + 1

while True:
	N = N - range
	count += 1
	if N < 1:
		break

print(count)

Submission status: Accepted

Solution code:
from collections import defaultdict,deque, Counter
import sys,heapq,bisect,math,itertools,string,queue,copy,time
import numpy as np
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())


[n, d] = inpl()

print(n//(2*d+1)+(n%(2*d+1)>0))

Submission status: Accepted

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

i = 0
while True:
    i += 1
    if (i * D * 2) + (i) >= N:
        break

print(i)

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 13,Nov,2019
"""

import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

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

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

Submission status: Accepted

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

observers = 0

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

print(observers)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
import math
def print_ans(N, D):
    """Test Case
    >>> print_ans(6, 2)
    2
    >>> print_ans(14, 3)
    2
    >>> print_ans(20, 4)
    3
    """
    print(math.ceil(N / (D * 2 + 1)))
    

if __name__ == '__main__':
    N, D = map(int,input().rstrip().split())
    print_ans(N, D)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#%%
import sys
def input():
    return sys.stdin.readline().rstrip()

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

# %%
if __name__ == '__main__':
    main()

# %%
# from atcoder_test import doTest
# doTest("abc134","b",main)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

x = 2 * d + 1
y = n / x

if float.is_integer(y):
    ans = int(y)
else:
    ans = int(y) + 1

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    from math import ceil
    n,d=map(int,input().split())
    print(ceil(n/(2*d+1)))
resolve()

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import unittest


class TestB(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think(6, 2), 2)

    def test_2(self):
        self.assertEqual(think(14, 3), 2)

    def test_3(self):
        self.assertEqual(think(20, 4), 3)


def solve():
    n, d = read()
    result = think(n, d)
    write(result)


def read():
    return read_int(2)


def read_int(n):
    return list(map(lambda x: int(x), read_line().split(' ')))[:n]


def read_float(n):
    return list(map(lambda x: float(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(n, d):
    territory = 2 * d + 1
    if n % territory == 0:
        return n // territory
    return n // territory + 1


def write(result):
    print(result)


if __name__ == '__main__':
    # unittest.main()
    solve()

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
import math
n,d = map(int,input().split())	

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
n,d=map(int,input().split(" "))
a=[]
for i in range(1,n+1):
    a.append(i)
flag=True
co=0
while flag==True:
    if len(a)>2*d+1:
        a=a[2*d+1:]
        co+=1
    else:
        co+=1
        flag=False
print(co)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

visible = d * 2 + 1

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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: Accepted

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

Submission status: Accepted

Solution code:
n, d = [int(i) for i in input().split()]
ans = 1
while ans*(2*d+1) < n:
        ans += 1
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
from math import ceil


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

Submission status: Accepted

Solution code:
import math

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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


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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

    if N>0:
        ans+=1

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n,d = map(int,input().split())
k = d + 1
ans = 0
isnegetive = False
while isnegetive == False:
  ans += 1
  x = n - (k + d)
  #print(n)
  k = k + d + 1 + d
  #print(k)
  if x <= 0:
    #print(i)
    isnegetive = True
  
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ND = input().split()
N = int(ND[0])
D = int(ND[1])
ans = 0
for i in range(N):
    if N <= (((2 * D) + 1) * ans):
        break
    else:
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

see = 2*D + 1

print(math.ceil(N/see))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

x = D+D+1
N += (-N)%x
answer = N//x
print(answer)

Submission status: Accepted

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

Submission status: Accepted

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: Accepted

Solution code:
import math

def main(N, D):
    print(math.ceil(N / (2*D+1)))

if __name__ == '__main__':
    N, D = map(int, input().split())
    main(N, D)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,d=[int(x) for x in input().split()]
for i in range(1,10):
  if i >= (n / (2*d+1)):
    print(i)
    break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 一人がカバーできる木は2*d+1
n, d = map(int, input().split())
a = 2*d+1
ans = (n-1)//a+1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

# 監視員1人あたり2D+1本の木を見張ることができる

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

m =1+D*2

print(-(-N//m))

Submission status: Accepted

Solution code:
import math
import sys
def input():
    return sys.stdin.readline()[:-1]

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

watch_range = D * 2 + 1

print(math.ceil(N / watch_range))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
import math
n,d = map(int,input().split())

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

Submission status: Accepted

Solution code:
import math
import sys
input = sys.stdin.readline


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil

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

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

Submission status: Accepted

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

Submission status: Accepted

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

canSee = D*2+1
a = N//canSee

if N > a*canSee:
    a += 1

print(a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == '__main__':
    slove()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():

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


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

Submission status: Accepted

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

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

Submission status: Accepted

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

Range = 2*D + 1

ans = N // Range

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n, d = map(int, open(0).read().split())

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    n, d = map(int, open(0).read().split())

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
N_D = list(map(int,input().split()))
max_watch = N_D[1] * 2 + 1
n = 0

while N_D[0] > max_watch * n:
    n += 1
print(n)

Submission status: Accepted

Solution code:
# *-* coding=utf-8 *-*


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, D = list(map(int, input().split()))
n, m = divmod(N, 2*D+1)

print(n + (m > 0))

Submission status: Accepted

Solution code:
N, D = map(int, input().split())
p_range = D * 2 + 1
q, mod = divmod(N, p_range)

if mod:
    print(q+1)
else:
    print(q)

Submission status: Accepted

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

count = 0
n = 0
while n < N:
    n += (2*D)+1
    count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(N: int, D: int):
    watch_range = 2 * D + 1

    people = 0
    while people * watch_range < N:
        people += 1

    print(people)


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    D = int(next(tokens))  # type: int
    solve(N, D)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

check = 1 + 2 * d

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

Submission status: Accepted

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

Submission status: Accepted

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: Accepted

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: Accepted

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

N = A[0]
D = A[1]

watch = 1 + (D * 2)

reminder = N % watch

range = N // watch

if reminder == 0:
	print(range)
elif reminder != 0:
	print(range + 1)

Submission status: Accepted

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