Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
345 B
1
Indexable
Never

#include <iostream>
#include <string>
#include <cmath>
using namespace std;

int main()
{
    string a;
    int i,b,summ=0,c;
    cin >> a;
    for(i = 0;i<a.size();i++){
        if (a[i] == '0') a[i] = '1';
    }
    for(i = 0;i<a.size();i++){
        b = 2;
        c = pow(2,i);
        summ +=c;
        
        
    }
    cout << summ;
}