#include <iostream>
#include <string.h>
#include <stdio.h>
using namespace std;
int main(){
string a;
cin>>a;
int num=a.length();
int i=0;
char b[num];
int res=0,flag=0;
for (i=0;i<num;i++){
b[i]=a[i];
}
b[num]='\0';
i=0;
for (i=0;i<num;i++){
if ((b[i]-'0')<=9 && (b[i]-'0')>=0) {res =res*10+(b[i]-'0');flag=1;}
else if (flag==1 && ((b[i]-'0')>9 || (b[i]-'0')<0)) {cout<<res;return 0;}
}
cout<<res;
}
//谢谢之前的提醒改了一下