import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans = 1;
        int x = 0;
        int[] ary = new int[a];
        for (int i = 0; i < a; i++) {
        	ary[i] = sc.nextInt();
        }
        for (int i = 0; i < a; i++) {
        	x += ary[i];
        	if (x <= b) {
            	ans++;
        	}
        }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans = 1;
        int x = 0;
        int[] ary = new int[a];
        for (int i = 0; i < a; i++) {
        	ary[i] = sc.nextInt();
        }
        for (int i = 0; i < a; i++) {
        	x += ary[i];
        	if (x <= b) {
            	ans++;
        	}
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans = 1;
        int x = 0;
        int[] ary = new int[a];
        for (int i = 0; i < a; i++) {
        	ary[i] = sc.nextInt();
        }
        for (int i = 0; i < a; i++) {
        	x += ary[i];
        	if (x <= b) {
            	ans++;
        	}
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans = 1;
        int x = 0;
        int[] ary = new int[a];
        for (int i = 0; i < a; i++) {
        	ary[i] = sc.nextInt();
        }
        for (int i = 0; i < a; i++) {
        	x += ary[i];
        	if (x <= b) {
            	ans++;
        	}
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int ans = 1; ans 1 int x = 0; x 0 int[] ary = new int[a]; ary new int[a] a for (int i = 0; i < a; i++) {
        	ary[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
        	ary[i] = sc.nextInt();
        } {
        	ary[i] = sc.nextInt();
        } ary[i] = sc.nextInt() ary[i] ary i sc.nextInt() sc.nextInt sc for (int i = 0; i < a; i++) {
        	x += ary[i];
        	if (x <= b) {
            	ans++;
        	}
        } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
        	x += ary[i];
        	if (x <= b) {
            	ans++;
        	}
        } {
        	x += ary[i];
        	if (x <= b) {
            	ans++;
        	}
        } x += ary[i] x ary[i] ary i if (x <= b) {
            	ans++;
        	} x <= b x b {
            	ans++;
        	} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans = 1;
        int x = 0;
        int[] ary = new int[a];
        for (int i = 0; i < a; i++) {
        	ary[i] = sc.nextInt();
        }
        for (int i = 0; i < a; i++) {
        	x += ary[i];
        	if (x <= b) {
            	ans++;
        	}
        }
        System.out.println(ans);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans = 1;
        int x = 0;
        int[] ary = new int[a];
        for (int i = 0; i < a; i++) {
        	ary[i] = sc.nextInt();
        }
        for (int i = 0; i < a; i++) {
        	x += ary[i];
        	if (x <= b) {
            	ans++;
        	}
        }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans = 1;
        int x = 0;
        int[] ary = new int[a];
        for (int i = 0; i < a; i++) {
        	ary[i] = sc.nextInt();
        }
        for (int i = 0; i < a; i++) {
        	x += ary[i];
        	if (x <= b) {
            	ans++;
        	}
        }
        System.out.println(ans);
    }
}