#include<iostream>
#include<string>
using namespace std;
int main(){
    string s;
    getline(cin,s);
    long bool num = 0;
    bool a = false;
    if(s.length()>=1 && s.length() <=100){
    for(char c:s){
        if(isdigit(c)){
            num = nu, *10 +(c-'0');
            a = true;
        }
    }
    if (a){cout<<num;}
    else {cout<<-1;}
    else{
        cout<<-1;
        return 0;
    }
}}