#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
    string s;
    cin>>s;
    string a="";
    int c=-1;
    for (string x:s)
    {
        if(x.digit())
        {
            a+=x;
            c=1;
        }
    }
    if(c==-1)
    { 
        cout<<"Invalid input";
    }
    else
    {
        cout<<a;
    }
    return 0;
}