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