import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int[] times = new int[n];
        for (int i = 0; i < n; i++) {
            times[i] = Integer.parseInt(sc.next());
        }
        int cnt = 0;
        int bound = 0;
        for (int i = 0; i < n; i++) {
            bound += times[i];
            if (bound > x) break;
            else {
                cnt++;
            }
        }
        System.out.println(1 + cnt);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int[] times = new int[n];
        for (int i = 0; i < n; i++) {
            times[i] = Integer.parseInt(sc.next());
        }
        int cnt = 0;
        int bound = 0;
        for (int i = 0; i < n; i++) {
            bound += times[i];
            if (bound > x) break;
            else {
                cnt++;
            }
        }
        System.out.println(1 + cnt);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int[] times = new int[n];
        for (int i = 0; i < n; i++) {
            times[i] = Integer.parseInt(sc.next());
        }
        int cnt = 0;
        int bound = 0;
        for (int i = 0; i < n; i++) {
            bound += times[i];
            if (bound > x) break;
            else {
                cnt++;
            }
        }
        System.out.println(1 + cnt);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int[] times = new int[n];
        for (int i = 0; i < n; i++) {
            times[i] = Integer.parseInt(sc.next());
        }
        int cnt = 0;
        int bound = 0;
        for (int i = 0; i < n; i++) {
            bound += times[i];
            if (bound > x) break;
            else {
                cnt++;
            }
        }
        System.out.println(1 + cnt);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int x = Integer.parseInt(sc.next()); x Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] times = new int[n]; times new int[n] n for (int i = 0; i < n; i++) {
            times[i] = Integer.parseInt(sc.next());
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            times[i] = Integer.parseInt(sc.next());
        } {
            times[i] = Integer.parseInt(sc.next());
        } times[i] = Integer.parseInt(sc.next()) times[i] times i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int cnt = 0; cnt 0 int bound = 0; bound 0 for (int i = 0; i < n; i++) {
            bound += times[i];
            if (bound > x) break;
            else {
                cnt++;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            bound += times[i];
            if (bound > x) break;
            else {
                cnt++;
            }
        } {
            bound += times[i];
            if (bound > x) break;
            else {
                cnt++;
            }
        } bound += times[i] bound times[i] times i if (bound > x) break;
            else {
                cnt++;
            } bound > x bound x break; {
                cnt++;
            } cnt++ cnt System.out.println(1 + cnt) System.out.println System.out System System.out 1 + cnt 1 cnt String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int[] times = new int[n];
        for (int i = 0; i < n; i++) {
            times[i] = Integer.parseInt(sc.next());
        }
        int cnt = 0;
        int bound = 0;
        for (int i = 0; i < n; i++) {
            bound += times[i];
            if (bound > x) break;
            else {
                cnt++;
            }
        }
        System.out.println(1 + cnt);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int[] times = new int[n];
        for (int i = 0; i < n; i++) {
            times[i] = Integer.parseInt(sc.next());
        }
        int cnt = 0;
        int bound = 0;
        for (int i = 0; i < n; i++) {
            bound += times[i];
            if (bound > x) break;
            else {
                cnt++;
            }
        }
        System.out.println(1 + cnt);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int[] times = new int[n];
        for (int i = 0; i < n; i++) {
            times[i] = Integer.parseInt(sc.next());
        }
        int cnt = 0;
        int bound = 0;
        for (int i = 0; i < n; i++) {
            bound += times[i];
            if (bound > x) break;
            else {
                cnt++;
            }
        }
        System.out.println(1 + cnt);
    }
}
