x,y = map(int, raw_input().split()) a,b = map(int, raw_input().split()) print abs(x - a) + abs(y - b)