give binary representation integer string s return number step reduce 1 follow rulesIf current number divide 2if current number odd add 1 itit guarantee reach test case Example 1input s 1101output 6explanation 1101 corresspond number 13 decimal representationstep 1 13 odd add 1 obtain 14 step 2 14 divide 2 obtain 7step 3 7 odd add 1 obtain 8step 4 8 divide 2 obtain 4 step 5 4 divide 2 obtain 2 step 6 2 divide 2 obtain 1 Example 2input s 10output 1explanation 10 corresspond number 2 decimal representationstep 1 2 divide 2 obtain 1 Example 3input s 1output 0 Constraints1 slength 500s consist character 0 1s0 1