#include <stdio.h> int main() { int n = 0; int arr[500] = { 0 }; int i = 0, j = 0; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d", &arr[i]); } for (i = 0; i < n - 1; i++) { for (j = 0; j < n - 1 - i; j++) { int temp; if (arr[j] < arr[j + 1]) { temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp; } } } printf("%d", arr[0]); return 0; }