import java.util.Scanner;

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

        int N = sc.nextInt();
        int X = sc.nextInt();
        int[] L = new int[N];
        for (int i = 0; i < L.length; ++i) {
            L[i] = sc.nextInt();
        }

        System.out.println(solve(L, X));

        sc.close();
    }

    static int solve(int[] L, int X) {
        int result = 1;
        int pos = 0;
        for (int Li : L) {
            pos += Li;
            if (pos <= X) {
                ++result;
            }
        }

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

        int N = sc.nextInt();
        int X = sc.nextInt();
        int[] L = new int[N];
        for (int i = 0; i < L.length; ++i) {
            L[i] = sc.nextInt();
        }

        System.out.println(solve(L, X));

        sc.close();
    }

    static int solve(int[] L, int X) {
        int result = 1;
        int pos = 0;
        for (int Li : L) {
            pos += Li;
            if (pos <= X) {
                ++result;
            }
        }

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

        int N = sc.nextInt();
        int X = sc.nextInt();
        int[] L = new int[N];
        for (int i = 0; i < L.length; ++i) {
            L[i] = sc.nextInt();
        }

        System.out.println(solve(L, X));

        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int X = sc.nextInt();
        int[] L = new int[N];
        for (int i = 0; i < L.length; ++i) {
            L[i] = sc.nextInt();
        }

        System.out.println(solve(L, X));

        sc.close();
    } 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 for (int i = 0; i < L.length; ++i) {
            L[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < L.length i L.length L L.length ++i ++i i {
            L[i] = sc.nextInt();
        } {
            L[i] = sc.nextInt();
        } L[i] = sc.nextInt() L[i] L i sc.nextInt() sc.nextInt sc System.out.println(solve(L, X)) System.out.println System.out System System.out solve(L, X) solve L X sc.close() sc.close sc String[] args args static int solve(int[] L, int X) {
        int result = 1;
        int pos = 0;
        for (int Li : L) {
            pos += Li;
            if (pos <= X) {
                ++result;
            }
        }

        return result;
    } solve {
        int result = 1;
        int pos = 0;
        for (int Li : L) {
            pos += Li;
            if (pos <= X) {
                ++result;
            }
        }

        return result;
    } int result = 1; result 1 int pos = 0; pos 0 for (int Li : L) {
            pos += Li;
            if (pos <= X) {
                ++result;
            }
        } int Li L {
            pos += Li;
            if (pos <= X) {
                ++result;
            }
        } {
            pos += Li;
            if (pos <= X) {
                ++result;
            }
        } pos += Li pos Li if (pos <= X) {
                ++result;
            } pos <= X pos X {
                ++result;
            } ++result result return result; result int[] L L int X X public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int X = sc.nextInt();
        int[] L = new int[N];
        for (int i = 0; i < L.length; ++i) {
            L[i] = sc.nextInt();
        }

        System.out.println(solve(L, X));

        sc.close();
    }

    static int solve(int[] L, int X) {
        int result = 1;
        int pos = 0;
        for (int Li : L) {
            pos += Li;
            if (pos <= X) {
                ++result;
            }
        }

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

        int N = sc.nextInt();
        int X = sc.nextInt();
        int[] L = new int[N];
        for (int i = 0; i < L.length; ++i) {
            L[i] = sc.nextInt();
        }

        System.out.println(solve(L, X));

        sc.close();
    }

    static int solve(int[] L, int X) {
        int result = 1;
        int pos = 0;
        for (int Li : L) {
            pos += Li;
            if (pos <= X) {
                ++result;
            }
        }

        return result;
    }
} Main
import java.util.Scanner;

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

        int N = sc.nextInt();
        int X = sc.nextInt();
        int[] L = new int[N];
        for (int i = 0; i < L.length; ++i) {
            L[i] = sc.nextInt();
        }

        System.out.println(solve(L, X));

        sc.close();
    }

    static int solve(int[] L, int X) {
        int result = 1;
        int pos = 0;
        for (int Li : L) {
            pos += Li;
            if (pos <= X) {
                ++result;
            }
        }

        return result;
    }
}