#include int a[10];int main(){for(int i=0;i<10;i++)std::cin>>a[i];std::sort(a,a+10);printf("%d\n",a[7]);}