import java.util.*;
import java.util.stream.*;

public class Main {
  public static int MOD = 1_000_000_007;

  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt(), X = in.nextInt();
    int[] L = new int[N];
    for (int i = 0; i < N; i++) {
      L[i] = in.nextInt();
    }
    int ans = 1, pos = 0;
    for (int i = 0; i < N; i++) {
      pos += L[i];
      if (X < pos) {
        break;
      }
      ans++;
    }
    System.out.println(ans);
  }
} import java.util.*; util.* java import java.util.stream.*; stream.* java.util public class Main {
  public static int MOD = 1_000_000_007;

  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt(), X = in.nextInt();
    int[] L = new int[N];
    for (int i = 0; i < N; i++) {
      L[i] = in.nextInt();
    }
    int ans = 1, pos = 0;
    for (int i = 0; i < N; i++) {
      pos += L[i];
      if (X < pos) {
        break;
      }
      ans++;
    }
    System.out.println(ans);
  }
} Main public static int MOD = 1_000_000_007; MOD 1_000_000_007 public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt(), X = in.nextInt();
    int[] L = new int[N];
    for (int i = 0; i < N; i++) {
      L[i] = in.nextInt();
    }
    int ans = 1, pos = 0;
    for (int i = 0; i < N; i++) {
      pos += L[i];
      if (X < pos) {
        break;
      }
      ans++;
    }
    System.out.println(ans);
  } main {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt(), X = in.nextInt();
    int[] L = new int[N];
    for (int i = 0; i < N; i++) {
      L[i] = in.nextInt();
    }
    int ans = 1, pos = 0;
    for (int i = 0; i < N; i++) {
      pos += L[i];
      if (X < pos) {
        break;
      }
      ans++;
    }
    System.out.println(ans);
  } Scanner in = new Scanner(System.in); in new Scanner(System.in) int N = in.nextInt() N in.nextInt() in.nextInt in X = in.nextInt(); X in.nextInt() in.nextInt in int[] L = new int[N]; L new int[N] N for (int i = 0; i < N; i++) {
      L[i] = in.nextInt();
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      L[i] = in.nextInt();
    } {
      L[i] = in.nextInt();
    } L[i] = in.nextInt() L[i] L i in.nextInt() in.nextInt in int ans = 1 ans 1 pos = 0; pos 0 for (int i = 0; i < N; i++) {
      pos += L[i];
      if (X < pos) {
        break;
      }
      ans++;
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      pos += L[i];
      if (X < pos) {
        break;
      }
      ans++;
    } {
      pos += L[i];
      if (X < pos) {
        break;
      }
      ans++;
    } pos += L[i] pos L[i] L i if (X < pos) {
        break;
      } X < pos X pos {
        break;
      } break; ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
  public static int MOD = 1_000_000_007;

  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt(), X = in.nextInt();
    int[] L = new int[N];
    for (int i = 0; i < N; i++) {
      L[i] = in.nextInt();
    }
    int ans = 1, pos = 0;
    for (int i = 0; i < N; i++) {
      pos += L[i];
      if (X < pos) {
        break;
      }
      ans++;
    }
    System.out.println(ans);
  }
} public class Main {
  public static int MOD = 1_000_000_007;

  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt(), X = in.nextInt();
    int[] L = new int[N];
    for (int i = 0; i < N; i++) {
      L[i] = in.nextInt();
    }
    int ans = 1, pos = 0;
    for (int i = 0; i < N; i++) {
      pos += L[i];
      if (X < pos) {
        break;
      }
      ans++;
    }
    System.out.println(ans);
  }
} Main
import java.util.*;
import java.util.stream.*;

public class Main {
  public static int MOD = 1_000_000_007;

  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt(), X = in.nextInt();
    int[] L = new int[N];
    for (int i = 0; i < N; i++) {
      L[i] = in.nextInt();
    }
    int ans = 1, pos = 0;
    for (int i = 0; i < N; i++) {
      pos += L[i];
      if (X < pos) {
        break;
      }
      ans++;
    }
    System.out.println(ans);
  }
}
