[r, x1, y1, x2, y2] = list(map(int, input().split(" ")))
dx = max(x2-x1, x1-x2)
dy = max(y2-y1, y1-y2)
d = (dx*dx + dy*dy)**(0.5)
d = int(d) + (1 if int(d)*int(d) < (dx*dx + dy*dy) else 0)
result = d//(2*r) + (1 if d % (2*r) > 0 else 0)
print(result)
