import java.util.Arrays; import java.util.Scanner; /** * Created by aayush on 10-02-2017. */ public class Solution { public static void main(String[] args) { Scanner in=new Scanner(System.in); int n=in.nextInt(); int[] arr=new int[n]; int min=Integer.MAX_VALUE; int x=0; int i=0; while(--n>=0) { arr[i]=in.nextInt(); i++; } Arrays.sort(arr); for(int j=1;jx) { min=x; } } System.out.println(min); } }