After performing the operations check if string S contains any 0 s
temp = 0 NEW_LINE for i in range ( 0 , N ) : NEW_LINE INDENT temp += 1 NEW_LINE if ( S [ i ] == '0' ) : NEW_LINE INDENT break NEW_LINE DEDENT DEDENT