// editor2
#include<iostream>
#include<string>
#include<cctype>
using namespace std;
int main(){
    string s;
    getline(cin,s);
    int count = 0;
    for(char c : s){
        if(!(isalpha(c)) && (!(ispunct(c))) && (!(isspace(c)))){
            int a = stoi(c);
            cout<<a;
            count++;
        }
    }
    
    if(count == 0){
        cout<<"-1";
    }
}