n=int(input()) values=list(input().split()) temp=0 for i in range (0,n): for j in range (i+1,n): if values[i] > values[j]: temp = values[j