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?
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.
Print one number — amount of operations needed to flip all coins tail up, or «-1» (without quotations) if it is impossible.
5 00101
12
3 101
4
1 1
1
5 00000
0