eolymp
Competitions

2-Stage UOI Zhitomir 2010-2011 2010 1 st stream

Side of the square

Time limit 1 second
Memory limit 64 MiB

Find the integer length of the square, which can be obtained from the two rectangles a x b and c x d, cut them into rectangles and then folded so as to obtain the greatest possible area of the square.

Input data

In one row there are four real numbers a, b, c, d. The area of each rectangle is less than 2·109.

Output data

Derive a single number - the educated side of the square.

Examples

Input example #1
1 2 3 4
Output example #1
3