a,b,c,d=input().split() a,b,c,d=int(a),int(b),int(c),int(d) x=abs(a-c) y=abs(b-d) if x>y: print(x) else: print(y)