Coins
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

There are $$$N$$$ coins laying on the table in a row. They can lay rather tail or eagle. Possible operation is if there are $$$k \ge 1$$$ coins laying with eagle up, you can flip a coin with number $$$k$$$. How many operations will it take to flip all coins on the table tail up?

Input

First line contains one number - $$$N$$$ ($$$1 \le N \le 10^5$$$). Next line contains $$$N$$$ symbols, symbol number $$$i$$$ is one if coin number $$$i$$$ is laying eagle up, and zero if coin number $$$i$$$ is laying tail up.

Output

Print one number — amount of operations needed to flip all coins tail up, or «-1» (without quotations) if it is impossible.

Examples

Input
5
00101
Output
12
Input
3
101
Output
4
Input
1
1
Output
1
Input
5
00000
Output
0