Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

E. Cookie Clicker

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputKostya is playing the computer game Cookie Clicker. The goal of this game is to gather cookies. You can get cookies using different buildings: you can just click a special field on the screen and get the cookies for the clicks, you can buy a cookie factory, an alchemy lab, a time machine and it all will bring lots and lots of cookies.

At the beginning of the game (time 0), Kostya has 0 cookies and no buildings. He has *n* available buildings to choose from: the *i*-th building is worth *c*_{i} cookies and when it's built it brings *v*_{i} cookies at the end of each second. Also, to make the game more interesting to play, Kostya decided to add a limit: at each moment of time, he can use only one building. Of course, he can change the active building each second at his discretion.

It's important that Kostya is playing a version of the game where he can buy new buildings and change active building only at time moments that are multiples of one second. Kostya can buy new building and use it at the same time. If Kostya starts to use a building at the time moment *t*, he can get the first profit from it only at the time moment *t* + 1.

Kostya wants to earn at least *s* cookies as quickly as possible. Determine the number of seconds he needs to do that.

Input

The first line contains two integers *n* and *s* (1 ≤ *n* ≤ 2·10^{5}, 1 ≤ *s* ≤ 10^{16}) — the number of buildings in the game and the number of cookies Kostya wants to earn.

Each of the next *n* lines contains two integers *v*_{i} and *c*_{i} (1 ≤ *v*_{i} ≤ 10^{8}, 0 ≤ *c*_{i} ≤ 10^{8}) — the number of cookies the *i*-th building brings per second and the building's price.

Output

Output the only integer — the minimum number of seconds Kostya needs to earn at least *s* cookies. It is guaranteed that he can do it.

Examples

Input

3 9

1 0

2 3

5 4

Output

6

Input

3 6

1 0

2 2

5 4

Output

5

Input

3 13

1 0

2 2

6 5

Output

7

Input

1 10000000000000000

1 0

Output

10000000000000000

Codeforces (c) Copyright 2010-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Oct/22/2019 15:55:11 (e2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|