p=list(map(int,input().split())) q=list(map(int,input().split()));a=0 for i,j in zip(p,q): i,j=max(i,j),min(i,j) a+=abs(i-j)/2 print(a)