import 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];
        for (int i = 0;i<n;i++) {
            l[i] = scanner.nextInt();
        }

        int d = 0;
        int count = 1;
        for (int i = 0;i<n;i++) {
            d += l[i];
            if (d <= x) {
                count++;
            }
        }
        
        System.out.println(count);
    }
} import java.util.*; util.* java 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];
        for (int i = 0;i<n;i++) {
            l[i] = scanner.nextInt();
        }

        int d = 0;
        int count = 1;
        for (int i = 0;i<n;i++) {
            d += l[i];
            if (d <= x) {
                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];
        for (int i = 0;i<n;i++) {
            l[i] = scanner.nextInt();
        }

        int d = 0;
        int count = 1;
        for (int i = 0;i<n;i++) {
            d += l[i];
            if (d <= x) {
                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];
        for (int i = 0;i<n;i++) {
            l[i] = scanner.nextInt();
        }

        int d = 0;
        int count = 1;
        for (int i = 0;i<n;i++) {
            d += l[i];
            if (d <= x) {
                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]; l new int[n] n for (int i = 0;i<n;i++) {
            l[i] = scanner.nextInt();
        } int i = 0; int i = 0; i 0 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 d = 0; d 0 int count = 1; count 1 for (int i = 0;i<n;i++) {
            d += l[i];
            if (d <= x) {
                count++;
            }
        } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
            d += l[i];
            if (d <= x) {
                count++;
            }
        } {
            d += l[i];
            if (d <= x) {
                count++;
            }
        } d += l[i] d l[i] l i if (d <= x) {
                count++;
            } d <= x d x {
                count++;
            } 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];
        for (int i = 0;i<n;i++) {
            l[i] = scanner.nextInt();
        }

        int d = 0;
        int count = 1;
        for (int i = 0;i<n;i++) {
            d += l[i];
            if (d <= x) {
                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];
        for (int i = 0;i<n;i++) {
            l[i] = scanner.nextInt();
        }

        int d = 0;
        int count = 1;
        for (int i = 0;i<n;i++) {
            d += l[i];
            if (d <= x) {
                count++;
            }
        }
        
        System.out.println(count);
    }
} Main
import 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];
        for (int i = 0;i<n;i++) {
            l[i] = scanner.nextInt();
        }

        int d = 0;
        int count = 1;
        for (int i = 0;i<n;i++) {
            d += l[i];
            if (d <= x) {
                count++;
            }
        }
        
        System.out.println(count);
    }
}