import java.util.*;
public class Main{
public static void main(String [] args){
Scanner in=new Scanner(System.in);
String str=in.nextLine();
System.out.print(ismax(str));
}
public static String ismax(String str){
int end=0;
int count=0;
int max=0;
String newstr="";
for(int i=0;i<str.length();i++){
if(str.charAt(i)>='0'&&str.charAt(i)<='9'){
count++;
if(max<count){
max=count;
end=i;
}
}else{
count=0;
}
newstr=str.substring(end-max+1,end+1);
}
return newstr;
}
}