Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 256M

Author:
Problem type
WCIPEG 2017-2018 Test

Geresh is applying for a specialized program at a certain high school. In order to be accepted, he must bribe teachers to give him good references. He needs references from N teachers, and each teacher has some price P_i which must be given to the teacher in secret. Fortunately, the right honourable Trustin Judeau has been blackmailed donated to Geresh a limited budget of B dollars.

Geresh wants to find out if he will have enough money to buy all the references he needs.

Input Specification

The first line of input contains the integers N (1 \le N \le 10\,000) and B (0 \le B \le 10^6). The next N lines contain the integers P_i (1 \le P_i \le 10^6).

Output Specification

If Geresh will not have enough money to bribe all the teachers, output The budget will balance itself. Otherwise, output the amount of money he will have remaining after bribing each teacher.

Sample Input 1

2 10
5
4

Sample Output 1

1

Sample Input 2

1 10
1000

Sample Output 2

The budget will balance itself

Comments

There are no comments at the moment.