#include <string>
#include <locale>
#include <bitset>
#include <iostream>
void find(const std::string& s)
{
std::string::size_type curr = 0, next;
for (; (next = s.find_first_of("01", curr)) != std::string::npos; )
{
curr = s.find_first_not_of("01", next);
const std::bitset<64> b(s.substr(next, curr-next));
std::cout << b.to_ulong() << std::endl;
}
}
int main()
{
setlocale(LC_ALL, "");
const std::string s = "abc1100def00112110zzz011pp1";
find(s);
return 0;
}