#include<iostream>
#include<string>
#include<cctype>
using namespace std;
int main()
{
    string s,result=" ";
    getline(cin,s);
    for(char c:s)
    {
            if(isdigit(c));
        {
            result+=c;
        }
    }
    if(result.empty())
    {
        cout<<-1<<endl;
    }
    else
    {
        count<<result<<endl;
    }
};