import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    // TODO 自動生成されたメソッド・スタブ
    Scanner scanner = new Scanner(System.in);
    int n = scanner.nextInt();
    int x = scanner.nextInt();
    List<Integer> intArray = new ArrayList<Integer>();

    for (int i = 0; i < n; i++) {
      int y = scanner.nextInt();
      intArray.add(y);
    }

    int count = 1;
    int sum = 0;


    for (Integer i : intArray) {
      sum  = sum + i;
      if(sum > x) {
        break;
      }
      count++;
    }

    System.out.println(count);
  }

} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) {
    // TODO 自動生成されたメソッド・スタブ
    Scanner scanner = new Scanner(System.in);
    int n = scanner.nextInt();
    int x = scanner.nextInt();
    List<Integer> intArray = new ArrayList<Integer>();

    for (int i = 0; i < n; i++) {
      int y = scanner.nextInt();
      intArray.add(y);
    }

    int count = 1;
    int sum = 0;


    for (Integer i : intArray) {
      sum  = sum + i;
      if(sum > x) {
        break;
      }
      count++;
    }

    System.out.println(count);
  }

} Main public static void main(String[] args) {
    // TODO 自動生成されたメソッド・スタブ
    Scanner scanner = new Scanner(System.in);
    int n = scanner.nextInt();
    int x = scanner.nextInt();
    List<Integer> intArray = new ArrayList<Integer>();

    for (int i = 0; i < n; i++) {
      int y = scanner.nextInt();
      intArray.add(y);
    }

    int count = 1;
    int sum = 0;


    for (Integer i : intArray) {
      sum  = sum + i;
      if(sum > x) {
        break;
      }
      count++;
    }

    System.out.println(count);
  } main {
    // TODO 自動生成されたメソッド・スタブ
    Scanner scanner = new Scanner(System.in);
    int n = scanner.nextInt();
    int x = scanner.nextInt();
    List<Integer> intArray = new ArrayList<Integer>();

    for (int i = 0; i < n; i++) {
      int y = scanner.nextInt();
      intArray.add(y);
    }

    int count = 1;
    int sum = 0;


    for (Integer i : intArray) {
      sum  = sum + i;
      if(sum > x) {
        break;
      }
      count++;
    }

    System.out.println(count);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int x = scanner.nextInt(); x scanner.nextInt() scanner.nextInt scanner List<Integer> intArray = new ArrayList<Integer>(); intArray new ArrayList<Integer>() for (int i = 0; i < n; i++) {
      int y = scanner.nextInt();
      intArray.add(y);
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      int y = scanner.nextInt();
      intArray.add(y);
    } {
      int y = scanner.nextInt();
      intArray.add(y);
    } int y = scanner.nextInt(); y scanner.nextInt() scanner.nextInt scanner intArray.add(y) intArray.add intArray y int count = 1; count 1 int sum = 0; sum 0 for (Integer i : intArray) {
      sum  = sum + i;
      if(sum > x) {
        break;
      }
      count++;
    } Integer i intArray {
      sum  = sum + i;
      if(sum > x) {
        break;
      }
      count++;
    } {
      sum  = sum + i;
      if(sum > x) {
        break;
      }
      count++;
    } sum  = sum + i sum sum + i sum i if(sum > x) {
        break;
      } sum > x sum x {
        break;
      } break; count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {

  public static void main(String[] args) {
    // TODO 自動生成されたメソッド・スタブ
    Scanner scanner = new Scanner(System.in);
    int n = scanner.nextInt();
    int x = scanner.nextInt();
    List<Integer> intArray = new ArrayList<Integer>();

    for (int i = 0; i < n; i++) {
      int y = scanner.nextInt();
      intArray.add(y);
    }

    int count = 1;
    int sum = 0;


    for (Integer i : intArray) {
      sum  = sum + i;
      if(sum > x) {
        break;
      }
      count++;
    }

    System.out.println(count);
  }

} public class Main {

  public static void main(String[] args) {
    // TODO 自動生成されたメソッド・スタブ
    Scanner scanner = new Scanner(System.in);
    int n = scanner.nextInt();
    int x = scanner.nextInt();
    List<Integer> intArray = new ArrayList<Integer>();

    for (int i = 0; i < n; i++) {
      int y = scanner.nextInt();
      intArray.add(y);
    }

    int count = 1;
    int sum = 0;


    for (Integer i : intArray) {
      sum  = sum + i;
      if(sum > x) {
        break;
      }
      count++;
    }

    System.out.println(count);
  }

} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    // TODO 自動生成されたメソッド・スタブ
    Scanner scanner = new Scanner(System.in);
    int n = scanner.nextInt();
    int x = scanner.nextInt();
    List<Integer> intArray = new ArrayList<Integer>();

    for (int i = 0; i < n; i++) {
      int y = scanner.nextInt();
      intArray.add(y);
    }

    int count = 1;
    int sum = 0;


    for (Integer i : intArray) {
      sum  = sum + i;
      if(sum > x) {
        break;
      }
      count++;
    }

    System.out.println(count);
  }

}