string str = Console.ReadLine();
string[] strArray = str.Split("");
int[] intArray = new int[strArray.Length];
for (int i =0; i < strArray.Length; i++){
int number = Convert.ToInt32(strArray[i]);
intArray[i]= number;
}
intmax1 = 0;int max2= 0;
for(int i =0; i < intArray.Length; i+){
if(intArray[i]> max1){
max2 = max1;
max1=intArray[i];
}
else{
if (intArray[i] >max2){
max2=intArray[i];
}
}
}
Console.WriteLine(max2);
static woid Main(string[] args){
string str = Console.ReadLine();
char temp ="";
for(int i =0; i < str.Length; i+){
int count =0 ;
for(int j=0; j< str.Length; j++){
if (str[j] = str[i{
count++ ;
if (count ==2){
break;
}
}
}
if (count==1)
temp =str[i];
break;
}
)
if(temp='"){
console.writeLine(no");
}
else{
console.writeLine(temp);
}
}
}
)