Problem:
 Score : 200 points    Problem Statement There are N apple trees in a row. People say that one of them will bear golden apples.  We want to deploy some number of inspectors so that each of these trees will be inspected.  Each inspector will be deployed under one of the trees. For convenience, we will assign numbers from 1 through N to the trees. An inspector deployed under the i -th tree (1 \leq i \leq N) will inspect the trees with numbers between i-D and i+D (inclusive).  Find the minimum number of inspectors that we need to deploy to achieve the objective.      Constraints  All values in input are integers.  1 \leq N \leq 20  1 \leq D \leq 20         Input Input is given from Standard Input in the following format:  N  D       Output Print the minimum number of inspectors that we need to deploy to achieve the objective.        Sample Input 1 6 2      Sample Output 1 2  We can achieve the objective by, for example, placing an inspector under Tree 3 and Tree 4 .       Sample Input 2 14 3      Sample Output 2 2       Sample Input 3 20 4      Sample Output 3 3

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

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

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

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

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

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

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

Solution (Python):
import numpy as np


def main():
	N, D = [int(x) for x in input().split()]
	
	p = N // (1+D*2)
	if not N % (1+D*2) == 0:
		p += 1
	print(p)
	
if __name__ == "__main__":
	main()

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

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

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

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

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

print(ans)

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

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

ans,mod = divmod(n,watch)

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

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

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

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

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

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

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

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

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

Solution (Python):
import math

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

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

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

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

Solution (Python):
import sys,heapq,math,resource
from collections import deque,defaultdict
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True 
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

def setrlim():
  sys.setrecursionlimit(250000)
  soft,hard = resource.getrlimit(RLIMIT_STACK)
  
  


n,d = inm()
e = 2*d+1
print((n+e-1)//e)

Solution (Python):

from __future__ import division, print_function

import os
import sys
import math
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


def main():
    n, d = map(int, input().split())

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




BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")



if __name__ == "__main__":
    main()

Solution (Python):
import math

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

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

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

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

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

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

print(ans)

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

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

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

Solution (Python):
import os, sys, re, math

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

Solution (Python):
import math

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

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

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

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

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

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

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

Solution (Python):
from sys import stdin

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

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

input = lambda: stdin.readline().rstrip()
main()

Solution (Python):
from sys import stdin
N,D = [int(x) for x in stdin.readline().rstrip().split()]
F = D*2 + 1
ans = N // F
if (N % F) > 0:
    ans += 1
print(ans)

Solution (Python):
import math

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

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

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

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


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

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

tmp = n
c = 0
while tmp >= 0:
	if tmp > 0:
		c+=1
	tmp-=(2*d)+1
print(c)

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

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

Solution (Python):
import math


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

Solution (Python):


import sys

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]


    token = lines[0].split()
    n = int(token[0])
    d = int(token[1])

    return (n, d)


def solve(n, d):

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




def main():
    

    print("%s" % solve(*parse_input()))

if __name__ == '__main__':

    main()

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

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

Solution (Python):
import math

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

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

r = (d * 2 + 1)

rrr = n // r
if (n % r != 0):
    rrr += 1

print(rrr)

Solution (Python):
import math



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

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

Solution (Python):


n, d = [int(x) for x in input().split(' ')]

d_range = 2 * d + 1

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

Solution (Python):

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

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

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

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

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

print(ans)

Solution (Python):
import math

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

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

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

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

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

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

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

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

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

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

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

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



while n > 0:
    n -= cover
    count += 1

print(count)

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

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

Solution (Python):
import math

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

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

Solution (Python):
import math

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

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

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

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

res=1

for i in range(20):
	if t>2*d+1:
		res+=1
		t-=2*d+1

print(res)

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

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

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

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

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

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

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

num = 1
look = 2*D+1
while(1):
    if look*num >= N:
        break
    num += 1
print(num)

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

Solution (Python):
import io
import sys
from math import ceil


def IN_S():
  return input()


def IN_I():
  return int(input())


def IN_L_I():
  return list(map(int, input().split()))


def IN_L_S():
  return list(map(str, input().split()))


def STR_SPLIT(s, n):
  for l in range(0, len(s), n):
    yield s[0 + l:n + l]


def T_IN():
  global test_str
  sys.stdin = io.StringIO(test_str[1:-1])


test_str = '''
20 1
'''


def MAIN():
  
  A()


def A():
  n, d = IN_L_I()

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

  return None


def B():
  return None


def C():
  return None


MAIN()

Solution (Python):



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

    

if __name__ == '__main__':
    main()

Solution (Python):
import math

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

Solution (Python):
[N, D] = [int(i) for i in input().split()]
E = 2*D + 1
ans = 0

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

Solution (Python):
import math

a, b = input().split()
a, b = int(a), int(b)

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

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
from functools import reduce
import sys
import math
import bisect
import random
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return list(map(float, sys.stdin.readline().split()))
def LS():return sys.stdin.readline().split()
def SR(n): return [list(sys.stdin.readline())[:-1] for i in range(n)]
def IR(n): return [int(sys.stdin.readline()) for i in range(n)]
def LIR(n): return [list(map(int, sys.stdin.readline().split())) for i in range(n)]
def LSR(n): return [list(map(list, sys.stdin.readline().split())) for i in range(n)]
_gcd = lambda x, y: _gcd(y, x%y) if (x%y) else y
_lcm = lambda x, y: x*y // _gcd(x, y)
def gcd(*numbers):
    return reduce(_gcd, numbers)
def lcm(*numbers):
    return reduce(_lcm, numbers)
sys.setrecursionlimit(1000000)
INF = float('inf')
mod = 1000000007
dire4 = [(1,0), (0,1), (-1,0), (0,-1)]
dire8 = [(1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1)]

N, D = LI()

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

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

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

if amr == 0:
  print(ans)

else:
  print(ans + 1)

Solution (Python):
import math

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

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

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

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

print(ans)

Solution (Python):


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

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

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

a = (2 * d) + 1

ans = -(-n // a)

print(ans)

Solution (Python):
import math

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

one = D * 2 + 1
amari = N % one
res = math.floor(N / one)
if amari > 0:
    res += 1

print(res)

Solution (Python):
import math

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

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

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

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

Solution (Python):


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

Solution (Python):
import sys
import numpy as np
from scipy.misc import comb
sys.setrecursionlimit(1000000)
 
n,d = map(int,input().split())

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

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

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

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

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

Solution (Python):
import math

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

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

see = 2*D+1

if N%see==0:
    ans = N/see

else:
    ans = (N-(N%see))/see + 1

print(int(ans))

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

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

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

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

Solution (Python):
if __name__ == '__main__':
    n, d = list(map(int, input().split(" ")))
  
    p = n // (2*d+1)
    if n % (2*d+1):
        p += 1

    print(p)

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

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

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

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

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

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

def hoge(n,d):
    if 0 >= n:
        return 0
    if d * 2 + 1 >= n:
        return 1
    return 2 + hoge(n - (d * 2 + 1)*2,d)

print(hoge(N,D))

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

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

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

Solution (Python):
n, d = [int(i) for i in input().split()]
for i in range(20):
    if((2*d+1)*i >= n):
        print(i)
        exit()

Solution (Python):
ls=input().split()
n=int(ls[0])
d=int(ls[1])
dd=int(2*d+1)
a=n//dd
b=n%dd
if b!=0:
    print(int(a+1))
else:
    print(int(a))

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

watch_range = 1 + 2*d

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

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

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

Solution (Python):
from sys import stdin

if __name__ == '__main__':
    N, D = [int(x) for x in stdin.readline().rstrip().split()]
    
    count = 0
    while (N > 0):
        N -= ( 2*D + 1 )
        count += 1
    print(count)

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

Solution (Python):


import sys

sys.setrecursionlimit(10**7)


input = sys.stdin.readline


def read_h(typ=int):
    return list(map(typ, input().split()))


def read_v(n, m=1, typ=int):
    return [read_h(typ) if m > 1 else typ(input()) for _ in range(n)]


def main():
    n, d = read_h()
    cov = 2 * d + 1

    import math
    ans = math.ceil(n / cov)
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
import math

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

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

Solution (Python):

import numpy as np

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

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

Solution (Python):


import sys

tmp = input().split()
hoge = list(map(lambda a: int(a), tmp))
n = hoge[0]
d = hoge[1]

d = d*2 +1

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

Solution (Python):
from sys import stdin

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

tmp = N // (2 * D + 1)
tmp2 = N % (2 * D + 1)

if tmp2 == 0:
    print(tmp)
else:
    print(tmp+1)

Solution (Python):



def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def main():
    n, d = rli()
    ans = n // (2*d+1)
    if n % (2*d+1) > 0:
        ans += 1
    print(ans)


if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

print(ans)

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

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

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

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

a, b = divmod(n , (d*2+1))
if b!=0:
    a=a+1
    
print("{}".format(a))

Solution (Python):

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

Solution (Python):

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

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

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

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

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

Solution (Python):
import numpy as np
N, D = map(int, input().split(" "))

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

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

Solution (Python):
import math

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

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

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

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

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

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

Solution (Python):
import math

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

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

Solution (Python):
import logging

logging.basicConfig(level=logging.INFO, format="%(message)s")


def main():
    N, D = map(int, input().split())
    logging.info("Hello!")

    print(-1 * ((-1 * N) // (D * 2 + 1)))
    
    
if __name__ == "__main__":
    main()

Solution (Python):
import math

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

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

if __name__ == "__main__":
    main()

Solution (Python):
import math
inplist = input().split(' ')
inplist_int = [int(i) for i in inplist]
print(math.ceil(inplist_int[0]/(inplist_int[1]*2+1)))

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

Solution (Python):
def main():
    n,d = map(int,input().split(' '))
    print(int(-1*(n//(-2*d-1))))
if __name__ == '__main__':
    main()

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

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

Solution (Python):



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


if __name__ == '__main__':
    main()

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

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

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

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

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

Solution (Python):
import fractions
from collections import deque
import numbers as np
import math


def main():
    N, D = map(int, input().split())
    tmp = 0
    cnt = 0
    while tmp < N:
        tmp += 2*D + 1
        cnt += 1

    print(cnt)


if __name__ == "__main__":
    main()

Solution (Python):
import math

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

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

num = 2 * d + 1

ret = n // num

if n % num != 0:
    ret+=1
print(ret)

Solution (Python):
import math

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

Solution (Python):
import numpy as np
import sys
import math
MAX_INT = int(10e12)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

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

Solution (Python):

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

eye = ND[1]*2 + 1

i = 0
count = 0

while i < ND[0]:
    i += eye
    count += 1

print(count)

Solution (Python):
import math


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

window = 1 + 2*d
num_watcher = n / window

print(math.ceil(num_watcher))

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

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

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

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

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

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

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

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

DD=D*2+1

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

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

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

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

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

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

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

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

Solution (Python):
nd = input().split(" ")
n = int(nd[0])
d = int(nd[1])

import math

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

Solution (Python):
import math

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

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

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

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

r=2*d+1

if n%r==0:
  ans=n//r
else:
  ans=n//r+1

print(ans)

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

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

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

S = N // (2*D+1)
T = N % (2*D+1)

if T == 0:
    print(S)
else:
    print(S+1)

Solution (Python):
import math

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

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

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

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

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

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

_d = d * 2 + 1

result = int(n / _d)
if not n % _d == 0:
    result += 1
print(result)

Solution (Python):


''' 
------------------------
author : iiou16
------------------------
'''
import math

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

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


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):

"""
Created on Sat Jul 20 20:53:20 2019

@author: ctiuser
"""

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

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

print(ans)

Solution (Python):


def read_input():
    n, d = map(int, input().split())
    return n, d


def submit():
    n, d = read_input()

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

    return


if __name__ == '__main__':
    submit()

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

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

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

Solution (Python):
from sys import stdin
import math

n, d = map(int, input().split())
c= 0
reach = d*2 +1
c = (n/reach)

print(math.ceil(c))

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

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

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

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