data = input()

r = int(data[:data.find(" ")])
data = data[data.find(" ")+1:]
x1 = int(data[:data.find(" ")])
data = data[data.find(" ")+1:]
y1 = int(data[:data.find(" ")])
data = data[data.find(" ")+1:]
x2 = int(data[:data.find(" ")])
data = data[data.find(" ")+1:]
y2 = int(data)

dx = abs(x2-x1)
dy = abs(y2-y1)
moving = dx + dy
steps = moving/(2*r)

print(int(steps))