#include<stdio.h>
#include<stdlib.h>
int main()
{
	int n, a[100];
	printf("Unesite koliko niz ima elemenata: ");
	scanf("%d", &n);
	printf("Unesite elemente niza : ");
	for (int i = 0; i < n; i++)
		scanf("%d", a[i]);
	int i = 0;
	for (int j = i + 1; j < n; j++)
	{
		if (a[j] > a[i]) {
			int b = a[i];
			a[i] = a[j];
			a[j] = b;
		
		}
	}
	printf("%d", b);
	system ("pause");
	return 0;
}