// editor3
#include <iostream>
using namespace std;
int main()
{
    string str;
    if(!(cin>>str))
    {
        return 0;
    }
    string res= "";
    for(char c : str)
    {
        if(isdigit(str))
        {
            res+=c;
        }
    
    }
    if(res.empty())
    {
        cout<<-1;
    }
    else{
    cout<<res;}
    return 0;
    
}