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:
a,b = map(int,input().split())
ans = a//(b+1)
if ans == a/(b+1):
  print(ans)
else:
  print(ans + 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from decimal import Decimal, ROUND_HALF_UP
n, d = map(int, input().split())
ans = Decimal(n/(d*2)).quantize(Decimal("1"),ROUND_HALF_UP)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

cnt = 0
for i in range(d, n, d*2):
    cnt += 1

print(cnt+1)

Submission status: Wrong Answer

Solution code:
N, D = map(int, input().split())
 
# 前から最適に配置せよ
# 一人目は, 1,...,D, D+1, D+2,...,2D+1 を監視
# 二人目は, 2D+2,..., 3D+2, ...,4D+2 を監視
# x人まで繰り返すと、1,...,x(2D+1)まで監視できる
 
# x(2D+1) > N を満たす最小のxは？
# x_min = ceil(N/(2D+1))

# ceil(B/A) = floor((A+B-1)/A)
print((N+2*D+1) // (2*D+1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

ans=n//(2*d)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    n, d = map(int, input().split())
    x = 1

    while True:
        monitoring = 2 * d * x

        if monitoring < n:
            x += 1
        else:
            break

    print(x)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
N,D = map(int,input().split())
print(math.ceil(D/N/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())
res = 0
for i in range(D,N+1,2*D):
  res += 1
  if i+D < N and i + 2*D > N:
    res+=1
print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: 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 sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

a, b = rm()
print(math.ceil(a/(2*b)))

Submission status: Wrong Answer

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

out = N/(2*D+1)
if out <= 1:
  print(1)
else:
  print(round(out+0.5))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for i in range(1,21):
  if (i - d) == 1:
    num = i + d
    ans = n / num
    if ans == int(ans):
        print(int(ans))
        exit()
    else:
        print(int(ans)+1)
        exit()

Submission status: Wrong Answer

Solution code:
import sys
import math
input = lambda: sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

num = -( -n // (2*d) )

print(num)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from math import ceil

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

while True:
    a=1+d
    x+=1
    if a>=n:
        break
    else:
        while True:
            a=a+d*2+1
            x+=1
            if a>=n-d:
                break                
        break

print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math


def solve(N, D):
    return math.ceil(N / (2 * D))


if __name__ == "__main__":
    # N = int(input())
    # Vs = list(map(int, input().split(" ")))
    N, D = tuple(map(int, input().split()))
    print(solve(N, D))

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc134/tasks/abc134_b

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

count = 0
ans = 1
for i in range(N):
    count += 1

    if count == D*2 + 2:
        ans += 1
        count = 0

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

m = d*2-1

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

Submission status: Wrong Answer

Solution code:
def golden_apple(n, d):

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

    return ans

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def golden_apple(n, d):

    ans = -(-n//(d*2))

    return ans

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
n,d=map(int,stdin.readline().split())
print(math.ceil(n/(d+d)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import factorial as fact
import math
import sys
import itertools
import numpy as np
from collections import Counter
import datetime
from collections import deque


#入力:N(int:整数)
def input1():
	return int(input())

#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))

def keta(N):
	return len(str(N))


def input_daytime(input_time):
	time,distance=input_time.split()
	t=time.split(":")
	se=str(t[-1]).split(".")
	dt1 = datetime.timedelta(hours=int(t[0]),minutes=int(t[1]),seconds=int(se[0]),milliseconds=int(se[1]))
	return dt1

def combinations(n,r):
	return list(itertools.combinations(range(n),r))



def all_sets(num_list):
	subsets=[]
	for i in range(2,len(num_list) + 1):
		for c in combinations(num_list, i):
			subsets.append(c) 
	return subsets

#公約数の列挙
def ch(x1):
	cf=[]
	for i in range(2,math.sqrt(x1)+1):
		if x1 % i==0:
			cf.append(i)
	return cf

def CountOneRoots(x,y):
	#x:縦，y:横
	return fact(x+y)/fact(x)/fact(y)

# 素因数分解
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
	
def count_str(m):
	tmp={}
	for i in range(10):
		if i in tmp:
			tmp[i]=1
		else:
			tmp[i]+=1
	return tmp

def is_prime(n):
	if n==1: return True

	for i in range(2,int(math.sqrt(n))+1):
		if n%i==0:
			return False
	return True


n,d=input2()

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

Submission status: Wrong Answer

Solution code:
from math import factorial as fact
import math
import sys
import itertools
import numpy as np
from collections import Counter
import datetime
from collections import deque


#入力:N(int:整数)
def input1():
	return int(input())

#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))

def keta(N):
	return len(str(N))


def input_daytime(input_time):
	time,distance=input_time.split()
	t=time.split(":")
	se=str(t[-1]).split(".")
	dt1 = datetime.timedelta(hours=int(t[0]),minutes=int(t[1]),seconds=int(se[0]),milliseconds=int(se[1]))
	return dt1

def combinations(n,r):
	return list(itertools.combinations(range(n),r))



def all_sets(num_list):
	subsets=[]
	for i in range(2,len(num_list) + 1):
		for c in combinations(num_list, i):
			subsets.append(c) 
	return subsets

#公約数の列挙
def ch(x1):
	cf=[]
	for i in range(2,math.sqrt(x1)+1):
		if x1 % i==0:
			cf.append(i)
	return cf

def CountOneRoots(x,y):
	#x:縦，y:横
	return fact(x+y)/fact(x)/fact(y)

# 素因数分解
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
	
def count_str(m):
	tmp={}
	for i in range(10):
		if i in tmp:
			tmp[i]=1
		else:
			tmp[i]+=1
	return tmp

def is_prime(n):
	if n==1: return True

	for i in range(2,int(math.sqrt(n))+1):
		if n%i==0:
			return False
	return True


n,d=input2()
print(n//(d*2+1)+1)

Submission status: Wrong Answer

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#############
# Main Code #
#############
N,D = inputIL()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

r = b*2+1

if a%b == 0:
    print(a//r)
else:
    print(a//r+1)

Submission status: Wrong Answer

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

r = b*2+1

if a%b == 0:
    print(a//b)
else:
    print(a//b+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,d = map(int,input().split())
r = d * 2 + 1
cnt = 0

while n >= 0:
    n = n - r
    cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
from decimal import Decimal,ROUND_HALF_UP
n,d = map(int,input().split())
x = n/(d*2)
print(Decimal(x).quantize(0,rounding=ROUND_HALF_UP))

Submission status: Wrong Answer

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

ans = n//(2*d)

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0
cnt = 0
while ans <= n:
    ans += d*2+1
    cnt += 1

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = list(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())

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for i in range(n):
    if n >= 2*d+1:
        count += 1
        n = n - (2*d+1)
print(n)
if n != 0:
    count += 1
print(count)

Submission status: Wrong Answer

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

for i in range(n):
    if n > 2*d+1:
        count += 1
        n = n - 2*d+1
if n != 0:
    count += 1

print(count)

Submission status: Wrong Answer

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

for i in range(n):
    if n > 2*d+1:
        count += 1
        n = 2*d+1
        if n != 0:
            count += 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# abc134_b.py
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/2/d))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n,d=map(int,input().split())
for i in range(n):
    if i*((d-1)*2+3)>=n:
        print(i)
        exit()

Submission status: Wrong Answer

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

for i in range(20):
    if a*i > n:
        print(i)

        break

Submission status: Wrong Answer

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

for i in range(n):
    if a*i > n:
        print(i)

        break

Submission status: Wrong Answer

Solution code:
import math

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

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

print(answer)

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())
import math
print(math.ceil((n-1)/(2*d+1)) )

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,d = [int(i) for i in input().split()]
a = 2*d+1
print((d+d-1)//d)

Submission status: Wrong Answer

Solution code:
#スペース区切りの整数の入力
N,D = map(int, input().split())

D_ = D*2 + 1

if(N%D_ == 0):
  print("a",int(N/D_))
else:
  print(int(N/D_+1))

Submission status: Wrong Answer

Solution code:
#スペース区切りの整数の入力
N,D = map(int, input().split())

D_ = D*2 + 1

if(N%D_ == 0):
  print(N%D_)
else:
  print(N%D_+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:
import math
n, k = list(map(int,input().split(' ')))
print(math.ceil(n / (k * 2)))

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
for i in range(21):
	l=(b+1)*i
	if l>=a:
		print(i)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

can = ((2*D)+1)

ans = 0

while N >= can:
  ans += 1
  N -= can
  
  
print(ans)

Submission status: Wrong Answer

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

can = ((2*N)+1)

ans = 0

while N > can:
  ans += 1
  N -= can
  
  
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

unit = d *2 + 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

x=N/(2*D+1)

if x.is_integer==True:
    print(int(x))
else:
    print(int(x)+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

c=a/d
if c>b:
  print(int(c)+1)
else:
  print(int(c))

Submission status: Wrong Answer

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

c=a/d
if c>b:
  print(c+1)
else:
  print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, D = map(int, input().split())
d = []
i = 1
while len(d) <= N:
    d += [i]*(D*2+1)
    i += 1
print(len(set(d)))

Submission status: Wrong Answer

Solution code:
N, D = map(int, input().split())
d = []
i = 1
while len(d) <= N:
    d += [i]*(D*2+1)
    i += 1
len(set(d))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a = n % (1 + d * 2)

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