#!/usr/bin/python

## This code will fail if the enteries are all the same integers or just one integer


a=raw_input("Enter a list of integers separated by space \n")
print type(a)  #this is string
print type(a.split())   #this is list
a=a.split()  #converts string to a list
a=set(a)   # removes duplicates
a=list(a)  #converts set back to a list
a.sort(key=int)   #to treat list elements like integers and then sort them.. use key=int
a.pop()   # this would remove the last element (largest) from the list
print a[len(a)-1]  #this would print the last element of the list.
