Олимпиадный тренинг

Задача 38323. Segment_0


On checkered paper, Petya drew a segment from a point with coordinates (a,b) to a point with coordinates (c,d). How many cells does this segment pass through?
Input
Integers a, b, c, d are entered. Modulo numbers do not exceed 109.

Imprint
Print one number — the number of cells through which the segment passes.
Examples
# Input Output
1 0 0 6 4 8
2 3 3 -3 3 0