Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
245 B
0
Indexable
Never
#include <cmath>
#include <string>
#include <iostream>
using namespace std;
int main()
{
	int c = 1;
	string a;
	cin >> a;
	for (int i = 0; i < a.length(); i++)
	{
		if (a[i] == '0')a[i] = '1';
		c += pow(2, i);
	}
	cout << c-1;
}