N dominoes stand on a number line. Domino i stands at position Xi with height Hi, and no two dominoes share a position.
You may pick one domino and push it to the left or to the right. Pushing a domino at position x with height h to the left makes every domino at a position p with x−h≤p≤x fall to the left. Pushing it to the right makes every domino at a position p with x≤p≤x+h fall to the right. A domino that falls this way keeps falling in the same direction and knocks over the dominoes inside its own range. The chain continues until no new domino falls.
Each push picks one domino and one direction. Compute the minimum number of pushes that knocks over all N dominoes.
Input
The first line contains N. (1≤N≤500000)
Each of the next N lines contains two integers Xi and Hi, the position and the height of one domino, separated by a space. (1≤Xi,Hi≤2000000000)
The dominoes are not necessarily given in order of position.
Output
Print the minimum number of pushes that knocks over every domino on the first line.