import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int bnd = in.nextInt();
        int lim = in.nextInt();
        int pos = 0;
        int ans = 0;

        for (int i = 0; i < bnd; i++) {
            pos += in.nextInt();
            if (lim < pos) {
                ans = i + 1;
                break;
            } else if (lim == pos) {
                ans = i + 2;
                break;
            } else if (i == bnd - 1) {
                ans = bnd + 1;
            }
        }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int bnd = in.nextInt();
        int lim = in.nextInt();
        int pos = 0;
        int ans = 0;

        for (int i = 0; i < bnd; i++) {
            pos += in.nextInt();
            if (lim < pos) {
                ans = i + 1;
                break;
            } else if (lim == pos) {
                ans = i + 2;
                break;
            } else if (i == bnd - 1) {
                ans = bnd + 1;
            }
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int bnd = in.nextInt();
        int lim = in.nextInt();
        int pos = 0;
        int ans = 0;

        for (int i = 0; i < bnd; i++) {
            pos += in.nextInt();
            if (lim < pos) {
                ans = i + 1;
                break;
            } else if (lim == pos) {
                ans = i + 2;
                break;
            } else if (i == bnd - 1) {
                ans = bnd + 1;
            }
        }
        System.out.println(ans);
    } main {
        Scanner in = new Scanner(System.in);
        int bnd = in.nextInt();
        int lim = in.nextInt();
        int pos = 0;
        int ans = 0;

        for (int i = 0; i < bnd; i++) {
            pos += in.nextInt();
            if (lim < pos) {
                ans = i + 1;
                break;
            } else if (lim == pos) {
                ans = i + 2;
                break;
            } else if (i == bnd - 1) {
                ans = bnd + 1;
            }
        }
        System.out.println(ans);
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int bnd = in.nextInt(); bnd in.nextInt() in.nextInt in int lim = in.nextInt(); lim in.nextInt() in.nextInt in int pos = 0; pos 0 int ans = 0; ans 0 for (int i = 0; i < bnd; i++) {
            pos += in.nextInt();
            if (lim < pos) {
                ans = i + 1;
                break;
            } else if (lim == pos) {
                ans = i + 2;
                break;
            } else if (i == bnd - 1) {
                ans = bnd + 1;
            }
        } int i = 0; int i = 0; i 0 i < bnd i bnd i++ i++ i {
            pos += in.nextInt();
            if (lim < pos) {
                ans = i + 1;
                break;
            } else if (lim == pos) {
                ans = i + 2;
                break;
            } else if (i == bnd - 1) {
                ans = bnd + 1;
            }
        } {
            pos += in.nextInt();
            if (lim < pos) {
                ans = i + 1;
                break;
            } else if (lim == pos) {
                ans = i + 2;
                break;
            } else if (i == bnd - 1) {
                ans = bnd + 1;
            }
        } pos += in.nextInt() pos in.nextInt() in.nextInt in if (lim < pos) {
                ans = i + 1;
                break;
            } else if (lim == pos) {
                ans = i + 2;
                break;
            } else if (i == bnd - 1) {
                ans = bnd + 1;
            } lim < pos lim pos {
                ans = i + 1;
                break;
            } ans = i + 1 ans i + 1 i 1 break; if (lim == pos) {
                ans = i + 2;
                break;
            } else if (i == bnd - 1) {
                ans = bnd + 1;
            } lim == pos lim pos {
                ans = i + 2;
                break;
            } ans = i + 2 ans i + 2 i 2 break; if (i == bnd - 1) {
                ans = bnd + 1;
            } i == bnd - 1 i bnd - 1 bnd 1 {
                ans = bnd + 1;
            } ans = bnd + 1 ans bnd + 1 bnd 1 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 in = new Scanner(System.in);
        int bnd = in.nextInt();
        int lim = in.nextInt();
        int pos = 0;
        int ans = 0;

        for (int i = 0; i < bnd; i++) {
            pos += in.nextInt();
            if (lim < pos) {
                ans = i + 1;
                break;
            } else if (lim == pos) {
                ans = i + 2;
                break;
            } else if (i == bnd - 1) {
                ans = bnd + 1;
            }
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int bnd = in.nextInt();
        int lim = in.nextInt();
        int pos = 0;
        int ans = 0;

        for (int i = 0; i < bnd; i++) {
            pos += in.nextInt();
            if (lim < pos) {
                ans = i + 1;
                break;
            } else if (lim == pos) {
                ans = i + 2;
                break;
            } else if (i == bnd - 1) {
                ans = bnd + 1;
            }
        }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int bnd = in.nextInt();
        int lim = in.nextInt();
        int pos = 0;
        int ans = 0;

        for (int i = 0; i < bnd; i++) {
            pos += in.nextInt();
            if (lim < pos) {
                ans = i + 1;
                break;
            } else if (lim == pos) {
                ans = i + 2;
                break;
            } else if (i == bnd - 1) {
                ans = bnd + 1;
            }
        }
        System.out.println(ans);
    }
}
