import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int X = sc.nextInt();
    int sum = 0;
    int ans = 1;
    for(int i = 0; i < N;i++){
        sum += sc.nextInt();
        if(sum <= X) {
            ans++;
        } else {
            break;
        }
    }
    System.out.println(ans);
  }
} import java.util.Scanner; Scanner java.util class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int X = sc.nextInt();
    int sum = 0;
    int ans = 1;
    for(int i = 0; i < N;i++){
        sum += sc.nextInt();
        if(sum <= X) {
            ans++;
        } else {
            break;
        }
    }
    System.out.println(ans);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int X = sc.nextInt();
    int sum = 0;
    int ans = 1;
    for(int i = 0; i < N;i++){
        sum += sc.nextInt();
        if(sum <= X) {
            ans++;
        } else {
            break;
        }
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int X = sc.nextInt();
    int sum = 0;
    int ans = 1;
    for(int i = 0; i < N;i++){
        sum += sc.nextInt();
        if(sum <= X) {
            ans++;
        } else {
            break;
        }
    }
    System.out.println(ans);
  } 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 sum = 0; sum 0 int ans = 1; ans 1 for(int i = 0; i < N;i++){
        sum += sc.nextInt();
        if(sum <= X) {
            ans++;
        } else {
            break;
        }
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
        sum += sc.nextInt();
        if(sum <= X) {
            ans++;
        } else {
            break;
        }
    } {
        sum += sc.nextInt();
        if(sum <= X) {
            ans++;
        } else {
            break;
        }
    } sum += sc.nextInt() sum sc.nextInt() sc.nextInt sc if(sum <= X) {
            ans++;
        } else {
            break;
        } sum <= X sum X {
            ans++;
        } ans++ ans {
            break;
        } break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int X = sc.nextInt();
    int sum = 0;
    int ans = 1;
    for(int i = 0; i < N;i++){
        sum += sc.nextInt();
        if(sum <= X) {
            ans++;
        } else {
            break;
        }
    }
    System.out.println(ans);
  }
}
