from decimal import Decimal,ROUND_HALF_UP

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

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

print(x)
n,d = list(map(int,input().split()))

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

print(x)
from decimal import Decimal, ROUND_HALF_UP

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

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

-from decimal import Decimal, ROUND_HALF_UP -