
import java.util.Scanner;

/**
 * @author author
 *
 */
public class Main {

  /**
   * @param args
   */
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    long x = Long.parseLong(sc.next());
    int d = 0;

    int[] numbers = new int[n];
    for (int i = 0; i < n; i++) {
      numbers[i] = Integer.parseInt(sc.next());
    }


    int resultNum = 1;
    for (int i = 0; i < n; i++) {
      d += numbers[i];
      if (d <= x) {
        resultNum++;
      } else {
        break;
      }
    }
    System.out.println(resultNum);
  }
} import java.util.Scanner; Scanner java.util public class Main {

  /**
   * @param args
   */
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    long x = Long.parseLong(sc.next());
    int d = 0;

    int[] numbers = new int[n];
    for (int i = 0; i < n; i++) {
      numbers[i] = Integer.parseInt(sc.next());
    }


    int resultNum = 1;
    for (int i = 0; i < n; i++) {
      d += numbers[i];
      if (d <= x) {
        resultNum++;
      } else {
        break;
      }
    }
    System.out.println(resultNum);
  }
} Main /**
   * @param args
   */
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    long x = Long.parseLong(sc.next());
    int d = 0;

    int[] numbers = new int[n];
    for (int i = 0; i < n; i++) {
      numbers[i] = Integer.parseInt(sc.next());
    }


    int resultNum = 1;
    for (int i = 0; i < n; i++) {
      d += numbers[i];
      if (d <= x) {
        resultNum++;
      } else {
        break;
      }
    }
    System.out.println(resultNum);
  } main {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    long x = Long.parseLong(sc.next());
    int d = 0;

    int[] numbers = new int[n];
    for (int i = 0; i < n; i++) {
      numbers[i] = Integer.parseInt(sc.next());
    }


    int resultNum = 1;
    for (int i = 0; i < n; i++) {
      d += numbers[i];
      if (d <= x) {
        resultNum++;
      } else {
        break;
      }
    }
    System.out.println(resultNum);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc long x = Long.parseLong(sc.next()); x Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc int d = 0; d 0 int[] numbers = new int[n]; numbers new int[n] n for (int i = 0; i < n; i++) {
      numbers[i] = Integer.parseInt(sc.next());
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      numbers[i] = Integer.parseInt(sc.next());
    } {
      numbers[i] = Integer.parseInt(sc.next());
    } numbers[i] = Integer.parseInt(sc.next()) numbers[i] numbers i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int resultNum = 1; resultNum 1 for (int i = 0; i < n; i++) {
      d += numbers[i];
      if (d <= x) {
        resultNum++;
      } else {
        break;
      }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      d += numbers[i];
      if (d <= x) {
        resultNum++;
      } else {
        break;
      }
    } {
      d += numbers[i];
      if (d <= x) {
        resultNum++;
      } else {
        break;
      }
    } d += numbers[i] d numbers[i] numbers i if (d <= x) {
        resultNum++;
      } else {
        break;
      } d <= x d x {
        resultNum++;
      } resultNum++ resultNum {
        break;
      } break; System.out.println(resultNum) System.out.println System.out System System.out resultNum String[] args args public class Main {

  /**
   * @param args
   */
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    long x = Long.parseLong(sc.next());
    int d = 0;

    int[] numbers = new int[n];
    for (int i = 0; i < n; i++) {
      numbers[i] = Integer.parseInt(sc.next());
    }


    int resultNum = 1;
    for (int i = 0; i < n; i++) {
      d += numbers[i];
      if (d <= x) {
        resultNum++;
      } else {
        break;
      }
    }
    System.out.println(resultNum);
  }
} public class Main {

  /**
   * @param args
   */
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    long x = Long.parseLong(sc.next());
    int d = 0;

    int[] numbers = new int[n];
    for (int i = 0; i < n; i++) {
      numbers[i] = Integer.parseInt(sc.next());
    }


    int resultNum = 1;
    for (int i = 0; i < n; i++) {
      d += numbers[i];
      if (d <= x) {
        resultNum++;
      } else {
        break;
      }
    }
    System.out.println(resultNum);
  }
} Main

import java.util.Scanner;

/**
 * @author author
 *
 */
public class Main {

  /**
   * @param args
   */
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    long x = Long.parseLong(sc.next());
    int d = 0;

    int[] numbers = new int[n];
    for (int i = 0; i < n; i++) {
      numbers[i] = Integer.parseInt(sc.next());
    }


    int resultNum = 1;
    for (int i = 0; i < n; i++) {
      d += numbers[i];
      if (d <= x) {
        resultNum++;
      } else {
        break;
      }
    }
    System.out.println(resultNum);
  }
}
