P=list(map(int,input().split())) Q=list(map(int,input().split())) if P[0] >= Q[0]: P.append(P[0]-Q[0]) else: P.append(Q[0]-P[0]) if P[1] >= Q[1]: Q.append(P[1]-Q[1]) else: Q.append(Q[1]-P[1]) if P[2]+Q[2] == 0: print(0) else: print((P[2]+Q[2])/2)