import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int[] d = new int[n+2];
        d[0] = 0;
        for (int i = 1; i <= n; i++) {
            d[i] = sc.nextInt();
            d[i] += d[i-1];
        }
        d[n+1] = Integer.MAX_VALUE;
        for(int i = 0; i < n+2; i++) {
          if(x < d[i]) {
        	System.out.println(i);
            return;
          }
        }
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int[] d = new int[n+2];
        d[0] = 0;
        for (int i = 1; i <= n; i++) {
            d[i] = sc.nextInt();
            d[i] += d[i-1];
        }
        d[n+1] = Integer.MAX_VALUE;
        for(int i = 0; i < n+2; i++) {
          if(x < d[i]) {
        	System.out.println(i);
            return;
          }
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int[] d = new int[n+2];
        d[0] = 0;
        for (int i = 1; i <= n; i++) {
            d[i] = sc.nextInt();
            d[i] += d[i-1];
        }
        d[n+1] = Integer.MAX_VALUE;
        for(int i = 0; i < n+2; i++) {
          if(x < d[i]) {
        	System.out.println(i);
            return;
          }
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int[] d = new int[n+2];
        d[0] = 0;
        for (int i = 1; i <= n; i++) {
            d[i] = sc.nextInt();
            d[i] += d[i-1];
        }
        d[n+1] = Integer.MAX_VALUE;
        for(int i = 0; i < n+2; i++) {
          if(x < d[i]) {
        	System.out.println(i);
            return;
          }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int[] d = new int[n+2]; d new int[n+2] n+2 n 2 d[0] = 0 d[0] d 0 0 for (int i = 1; i <= n; i++) {
            d[i] = sc.nextInt();
            d[i] += d[i-1];
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            d[i] = sc.nextInt();
            d[i] += d[i-1];
        } {
            d[i] = sc.nextInt();
            d[i] += d[i-1];
        } d[i] = sc.nextInt() d[i] d i sc.nextInt() sc.nextInt sc d[i] += d[i-1] d[i] d i d[i-1] d i-1 i 1 d[n+1] = Integer.MAX_VALUE d[n+1] d n+1 n 1 Integer.MAX_VALUE Integer Integer.MAX_VALUE for(int i = 0; i < n+2; i++) {
          if(x < d[i]) {
        	System.out.println(i);
            return;
          }
        } int i = 0; int i = 0; i 0 i < n+2 i n+2 n 2 i++ i++ i {
          if(x < d[i]) {
        	System.out.println(i);
            return;
          }
        } {
          if(x < d[i]) {
        	System.out.println(i);
            return;
          }
        } if(x < d[i]) {
        	System.out.println(i);
            return;
          } x < d[i] x d[i] d i {
        	System.out.println(i);
            return;
          } System.out.println(i) System.out.println System.out System System.out i return; String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int[] d = new int[n+2];
        d[0] = 0;
        for (int i = 1; i <= n; i++) {
            d[i] = sc.nextInt();
            d[i] += d[i-1];
        }
        d[n+1] = Integer.MAX_VALUE;
        for(int i = 0; i < n+2; i++) {
          if(x < d[i]) {
        	System.out.println(i);
            return;
          }
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int[] d = new int[n+2];
        d[0] = 0;
        for (int i = 1; i <= n; i++) {
            d[i] = sc.nextInt();
            d[i] += d[i-1];
        }
        d[n+1] = Integer.MAX_VALUE;
        for(int i = 0; i < n+2; i++) {
          if(x < d[i]) {
        	System.out.println(i);
            return;
          }
        }
    }
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int[] d = new int[n+2];
        d[0] = 0;
        for (int i = 1; i <= n; i++) {
            d[i] = sc.nextInt();
            d[i] += d[i-1];
        }
        d[n+1] = Integer.MAX_VALUE;
        for(int i = 0; i < n+2; i++) {
          if(x < d[i]) {
        	System.out.println(i);
            return;
          }
        }
    }
}
