n teams arrived to the Informatics Olympiad. Each team consists of
ai boys and
bi girls (1 ≤ i ≤ n). The participants can live in rooms with m places in each. Find the minimum number of rooms needed to accommodate all the Olympiad participants, if the boys can't be settled with the girls.
The first line contains the values of n and m. In the next n lines the pairs of numbers
bi (1 ≤ i ≤ n) are given. All numbers are positive integers not greater than 100.
Print the minimum required number of rooms.
2 3 2 1 3 2