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