// editor1
#include<iostream>
#include<string>
using namespace std;
int main()
{
    string s;
    cin> s;
    string result ="";
    if(s.length() >=1 && s.length() <=100){
        for (int i=0;i<s.length();i++)
        if(isdigit(s[i])){
            result +=s[i];
        }
    }
    if(result.length()==0){
        cout<<-1;
    }else{
        int f=stoi(result);
        cout<<f;
    }
    return 0;
}