X_a, Y_a = map(int,input().split()) X_b, Y_b = map(int,input().split()) X_a = -X_a dxdy = (Y_b - Y_a) / (X_b - X_a) print(Y_a - (dxdy * X_a))