import java.util.*; class Yukico5 { public static void main(String[] args){ Scanner in = new Scanner(System.in); int l = in.nextInt(); int n = in.nextInt(); int[] w = new int[n]; for(int i=0; i= w[i]+a) { a = w[i]; } else { System.out.println(i); break; } } } }