#include <stdio.h>

int main(void) {
	// your code goes here
    int data[8] = {3, -10, 6, 0, 2, -1, 8, 5};
	int  count, i, j;
 int max=data[0],second=data[1];
 for(i=2;i<8;i++){
  if(data[i]>max){
   second=max;
   max=data[i];
   }
  else if(data[i]>second)
   second=data[i];
  }
 printf("%d",second);
 

	return 0;
}
