import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    int max = sc.nextInt();

    int jump = 1;
    int position = 0;
    for (int i = 0; i < n; i++) {
      int move = sc.nextInt();
      position += move;

      if(position <= max) {
        jump++;
      }
    }

    System.out.println(jump);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    int max = sc.nextInt();

    int jump = 1;
    int position = 0;
    for (int i = 0; i < n; i++) {
      int move = sc.nextInt();
      position += move;

      if(position <= max) {
        jump++;
      }
    }

    System.out.println(jump);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    int max = sc.nextInt();

    int jump = 1;
    int position = 0;
    for (int i = 0; i < n; i++) {
      int move = sc.nextInt();
      position += move;

      if(position <= max) {
        jump++;
      }
    }

    System.out.println(jump);
  } main {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    int max = sc.nextInt();

    int jump = 1;
    int position = 0;
    for (int i = 0; i < n; i++) {
      int move = sc.nextInt();
      position += move;

      if(position <= max) {
        jump++;
      }
    }

    System.out.println(jump);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int max = sc.nextInt(); max sc.nextInt() sc.nextInt sc int jump = 1; jump 1 int position = 0; position 0 for (int i = 0; i < n; i++) {
      int move = sc.nextInt();
      position += move;

      if(position <= max) {
        jump++;
      }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      int move = sc.nextInt();
      position += move;

      if(position <= max) {
        jump++;
      }
    } {
      int move = sc.nextInt();
      position += move;

      if(position <= max) {
        jump++;
      }
    } int move = sc.nextInt(); move sc.nextInt() sc.nextInt sc position += move position move if(position <= max) {
        jump++;
      } position <= max position max {
        jump++;
      } jump++ jump System.out.println(jump) System.out.println System.out System System.out jump String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    int max = sc.nextInt();

    int jump = 1;
    int position = 0;
    for (int i = 0; i < n; i++) {
      int move = sc.nextInt();
      position += move;

      if(position <= max) {
        jump++;
      }
    }

    System.out.println(jump);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    int max = sc.nextInt();

    int jump = 1;
    int position = 0;
    for (int i = 0; i < n; i++) {
      int move = sc.nextInt();
      position += move;

      if(position <= max) {
        jump++;
      }
    }

    System.out.println(jump);
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    int max = sc.nextInt();

    int jump = 1;
    int position = 0;
    for (int i = 0; i < n; i++) {
      int move = sc.nextInt();
      position += move;

      if(position <= max) {
        jump++;
      }
    }

    System.out.println(jump);
  }
}
