Problem Description
In the Royal Library, archivists write magic books. To complete the next book, the -th letter must be used at least times. Remember that the country uses an alphabet of letters.
A stamp is a piece of sticky paper with letters written on it (letters may repeat). The appearance of the stamp, which letters are written on it, etc., is agreed upon in advance and cannot be changed. After agreeing on the appearance of the stamp, based on this agreement an unlimited number of stamps will be created.
The book will be printed using these stamps. Only one stamp may be affixed to one page of the book.
If you can choose letters for the stamp design, find the minimum number of pages needed to write the book.
If it is impossible to write the book, i.e. even an unlimited number of stamps will not be enough, then output .
Input Format
The first line gives --- the number of letters in the alphabet and --- the number of letters in the stamp.
The second line gives integers --- the minimum required number of the -th letter to write the book.
Constraints:
Output Format
Output the minimum number of pages to write the book, given that you are designing the stamp. If this is impossible, output .
Scoring
| Subtask | Additional constraints | Points | Required subtasks |
|---|---|---|---|
| Tests from the example | - | ||
| ; |
Notes
In the first test, no matter how many stamps there are, it is impossible to make different letters from a stamp that holds symbols.