import java.util.*; public class Test11 { public static void main(String[] args){ Scanner sc=new Scanner(System.in); String[] line; line=sc.nextLine().split(" "); int w=Integer.parseInt(line[0]); line=sc.nextLine().split(" "); int n=Integer.parseInt(line[0]); int m=0,size=0; int[] block=new int[n]; line=sc.nextLine().split(" "); for(int i=0;i