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