
import java.util.Scanner;

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

        int N = scanner.nextInt();
        int X = scanner.nextInt();
        int[] L = new int[N + 1];

        for (int i = 1 ; i <= N ; i++) {
            L[i] = scanner.nextInt();
        }

        int count = 1;
        int d = 0;

        for (int i = 1 ; i <= N ; i++) {
            d += L[i];
            if (d > X) {
                break;
            }
            count++;
        }

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

        int N = scanner.nextInt();
        int X = scanner.nextInt();
        int[] L = new int[N + 1];

        for (int i = 1 ; i <= N ; i++) {
            L[i] = scanner.nextInt();
        }

        int count = 1;
        int d = 0;

        for (int i = 1 ; i <= N ; i++) {
            d += L[i];
            if (d > X) {
                break;
            }
            count++;
        }

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

        int N = scanner.nextInt();
        int X = scanner.nextInt();
        int[] L = new int[N + 1];

        for (int i = 1 ; i <= N ; i++) {
            L[i] = scanner.nextInt();
        }

        int count = 1;
        int d = 0;

        for (int i = 1 ; i <= N ; i++) {
            d += L[i];
            if (d > X) {
                break;
            }
            count++;
        }

        System.out.println(count);
    } main {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int X = scanner.nextInt();
        int[] L = new int[N + 1];

        for (int i = 1 ; i <= N ; i++) {
            L[i] = scanner.nextInt();
        }

        int count = 1;
        int d = 0;

        for (int i = 1 ; i <= N ; i++) {
            d += L[i];
            if (d > 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 int[] L = new int[N + 1]; L new int[N + 1] N + 1 N 1 for (int i = 1 ; i <= N ; i++) {
            L[i] = scanner.nextInt();
        } int i = 1 ; int i = 1 ; i 1 i <= N i N i++ i++ i {
            L[i] = scanner.nextInt();
        } {
            L[i] = scanner.nextInt();
        } L[i] = scanner.nextInt() L[i] L i scanner.nextInt() scanner.nextInt scanner int count = 1; count 1 int d = 0; d 0 for (int i = 1 ; i <= N ; i++) {
            d += L[i];
            if (d > X) {
                break;
            }
            count++;
        } int i = 1 ; int i = 1 ; i 1 i <= N i N i++ i++ i {
            d += L[i];
            if (d > X) {
                break;
            }
            count++;
        } {
            d += L[i];
            if (d > X) {
                break;
            }
            count++;
        } d += L[i] d L[i] L i if (d > X) {
                break;
            } d > X d 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) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int X = scanner.nextInt();
        int[] L = new int[N + 1];

        for (int i = 1 ; i <= N ; i++) {
            L[i] = scanner.nextInt();
        }

        int count = 1;
        int d = 0;

        for (int i = 1 ; i <= N ; i++) {
            d += L[i];
            if (d > X) {
                break;
            }
            count++;
        }

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

        int N = scanner.nextInt();
        int X = scanner.nextInt();
        int[] L = new int[N + 1];

        for (int i = 1 ; i <= N ; i++) {
            L[i] = scanner.nextInt();
        }

        int count = 1;
        int d = 0;

        for (int i = 1 ; i <= N ; i++) {
            d += L[i];
            if (d > X) {
                break;
            }
            count++;
        }

        System.out.println(count);
    }
} Main

import java.util.Scanner;

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

        int N = scanner.nextInt();
        int X = scanner.nextInt();
        int[] L = new int[N + 1];

        for (int i = 1 ; i <= N ; i++) {
            L[i] = scanner.nextInt();
        }

        int count = 1;
        int d = 0;

        for (int i = 1 ; i <= N ; i++) {
            d += L[i];
            if (d > X) {
                break;
            }
            count++;
        }

        System.out.println(count);
    }
}
