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