#!/usr/bin/env python # -*- coding: utf-8 -*- p = list(map(int,input().split())) q = list(map(int,input().split())) print(int((abs(q[0]-p[0]) + abs(q[1]-p[1]))/2))