import java.util.*; class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int n = sc.nextInt(); int m = sc.nextInt(); int[] ar = new int[n]; for (int i=0; i 0) m -= ar[i]; else if (m-ar[i] == 0) { System.out.println(i+1); return; } else { System.out.println(i); return; } } } }