#import int a[9],*p=a;main(){for(;std::cin>>*p++;)std::sort(a,p);printf("%d\n",a[7]);}