import numpy as np

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

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

import math

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

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

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

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

-import numpy as np +N, D = list(map(int, input().split())) +import math -N, D = list(map(int, input().split())) -print((int(np.ceil(N / (2 * D + 1))))) +print((math.ceil(N / (2 * D + 1))))