#import int i=10,x[10]; main(){for(;i--;)scanf("%d",&x[i]);std::sort(x,x+10);printf("%d\n",x[7]);}