Doubt help help help

can you give me the anser of this problem

@Yash-Verma-1309246139239348 Take input as a string now start iteration from the beggining of the string,
First do this.
ans=2*ans;
Now if the current char is 1 add 1 to answer.
Finally you will have answer in ans
Use long long trype for ans.
If this resolves your doubt mark it as resolved.