import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int Nw = sc.nextInt(); int [] W = new int [Nw]; for(int i=0; i=b[b.length-1]){ return 1; }else{ for(int i=0; i