Can someone give me a hint on this question?

You are given a row of N Bijlibulbs, numbered from 1 to N. You know about each Bijlibulbswhether it’s turned on or off. You can change the state of Bijlibulbs i if Bijlibulb i+1 is turnedon and Bijlibulbs i+2, i+3, … N are turned off. This rule doesn’t apply to lightbulb N, whichcan be switched on or off at will.Compute the minimum number of switches you need to make in order to turn off all theBijlibulbs.

Input Format

The input contains a single string of values from the set {0,1}. N is equal to the length of thestring, and each Bijlibulb is represented by a char. A Bijlibulb that is switched off isrepresented by a 0, and one that is switched on by a 1.

Constraints1 ≤ N ≤ 50.Output Format

The output should contain a single number representing the minimum number of switchesneeded.

Sample Input

1011

Sample Output

13