시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB21121168.750%

문제

Dave somehow acquired exchange rates of US dollar to German marks for several days in the future. Write a program that will suggest Dave when to buy or sell marks or dollars so that, starting with 100 marks he ends up with the highest possible amount of marks at the end of the last day.

입력

The first line of input file contains a natural number N, 1 ≤ N ≤ 100, the number of future days for which Dave knows exchange rates.

Each of N following lines contains two natural numbers B and S separated with a space, 100 ≤ B ≤ S ≤ 1000. The (i+1)th line describes the exchange rate of ith day in advance.

Those two numbers determine the exchange rate in the following way: B dollars can be bought for 100 marks, and 100 marks can be bought for S dollars.

출력

The first and only line of output file should contain a desired amount written to two decimal places.

Remark: Due to real arithmetic round off errors, results within error of 0.05 marks of correct value will be regarded as correct.

예제 입력 1

3
393 398
394 401
386 386

예제 출력 1

102.07

예제 입력 2

5
300 300
310 320
320 330
330 330
300 320

예제 출력 2

103.12

예제 입력 3

8
218 219
228 231
227 235
205 213
230 232
239 239
251 258
205 213

예제 출력 3

126.14