N. Nancy's Numbers
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Examples
Input
7
3 1 4 1 5 9 2
Output
5
Input
1
77777
Output
0
Input
5
100 100 100 100 100
Output
10