Submit | All submissions | Best solutions | Back to list |
RETO1M10 - 5RETO 10 MARATON |
Polycarpus loves television series. Now he's ready to finish watching a season of a popular comedy "Graph Theory". In total, the season has n episodes, numbered with integers from 1 to n numbers.
Polycarpus has not observed episodes one by one, but in a random order. You've seen every episode except one. What episode forgot Polycaprus to see?
Input
The first line of the input contains an integer n (2 ≤ n ≤ 100 000) - the number of episodes in a season. Suppose that the episodes are numbered by integers from 1 to n.
The second line contains n - 1 integers, a1, a2 ... an (1 ≤ ai ≤ n). The numbers of the episodes that Polycarpus has seen. All ai values are different.
Output
Print episode number Polycarpus has not seen.
Example
Input: 10 3 8 10 1 7 9 6 5 2 Output: 4
Added by: | MARATON AFDM |
Date: | 2015-09-28 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | MAWK BC C NCSHARP CSHARP C++ 4.3.2 CPP14 COFFEE DART FORTH JAVA JS-RHINO JULIA KTLN NODEJS OCT PHP PROLOG PYPY3 R RACKET SQLITE SWIFT UNLAMBDA |
hide comments
2015-09-29 02:34:24 Francky
All problems of the user moved to tutorial. @psetter : please solve some tasks here ; don't use unnecessary language restrictions ; choose carefully tutorial/classical section for each problem. @all : if one of these problems could go back to classical, please mention it with requirements to make it decent. |
|
2015-09-28 23:33:17 Scape
Please stop spamming with trivial tutorial problems. |
|
2015-09-28 13:47:13 wisfaq
unnecessary language restrictions tutorial problem |