#!/usr/bin/env python3
ax, ay = map(int,input().split())
bx, by = map(int,input().split())
ax *= -1
k = (by - ay) / (bx - ax)
py = ay + k * (- ax)
print('%.8f' % py)