import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();//n＋1回飛ぶ
        int x = sc.nextInt();//座標
        int[] L = new int[n];
        int sum = 0;
        int cnt = 0;
        int ans = 1;

        for(int i = 0;i < n;i++){
            L[i] = sc.nextInt();
        }
        for(int i = 0;i < n;i++){
            cnt += L[i];
            if(cnt <= x)
            ans++;
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();//n＋1回飛ぶ
        int x = sc.nextInt();//座標
        int[] L = new int[n];
        int sum = 0;
        int cnt = 0;
        int ans = 1;

        for(int i = 0;i < n;i++){
            L[i] = sc.nextInt();
        }
        for(int i = 0;i < n;i++){
            cnt += L[i];
            if(cnt <= x)
            ans++;
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();//n＋1回飛ぶ
        int x = sc.nextInt();//座標
        int[] L = new int[n];
        int sum = 0;
        int cnt = 0;
        int ans = 1;

        for(int i = 0;i < n;i++){
            L[i] = sc.nextInt();
        }
        for(int i = 0;i < n;i++){
            cnt += L[i];
            if(cnt <= x)
            ans++;
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();//n＋1回飛ぶ
        int x = sc.nextInt();//座標
        int[] L = new int[n];
        int sum = 0;
        int cnt = 0;
        int ans = 1;

        for(int i = 0;i < n;i++){
            L[i] = sc.nextInt();
        }
        for(int i = 0;i < n;i++){
            cnt += L[i];
            if(cnt <= x)
            ans++;
        }
        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[] L = new int[n]; L new int[n] n int sum = 0; sum 0 int cnt = 0; cnt 0 int ans = 1; ans 1 for(int i = 0;i < n;i++){
            L[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            L[i] = sc.nextInt();
        } {
            L[i] = sc.nextInt();
        } L[i] = sc.nextInt() L[i] L i sc.nextInt() sc.nextInt sc for(int i = 0;i < n;i++){
            cnt += L[i];
            if(cnt <= x)
            ans++;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            cnt += L[i];
            if(cnt <= x)
            ans++;
        } {
            cnt += L[i];
            if(cnt <= x)
            ans++;
        } cnt += L[i] cnt L[i] L i if(cnt <= x)
            ans++; cnt <= x cnt x ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();//n＋1回飛ぶ
        int x = sc.nextInt();//座標
        int[] L = new int[n];
        int sum = 0;
        int cnt = 0;
        int ans = 1;

        for(int i = 0;i < n;i++){
            L[i] = sc.nextInt();
        }
        for(int i = 0;i < n;i++){
            cnt += L[i];
            if(cnt <= x)
            ans++;
        }
        System.out.println(ans);
    }
}