import java.util.Scanner;

public class Main {
  public static void main (String[] args) {
    Scanner in = new Scanner(System.in);

    while (in.hasNext()) {
      int N = in.nextInt();
      int X = in.nextInt();
      int count = 1;
      int pos = 0;
      
      for (int i = 0; i < N; ++i) {
        pos += in.nextInt();

        if (pos <= X) {
          ++count;
        }
      }

      System.out.println(count);
    }
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main (String[] args) {
    Scanner in = new Scanner(System.in);

    while (in.hasNext()) {
      int N = in.nextInt();
      int X = in.nextInt();
      int count = 1;
      int pos = 0;
      
      for (int i = 0; i < N; ++i) {
        pos += in.nextInt();

        if (pos <= X) {
          ++count;
        }
      }

      System.out.println(count);
    }
  }
} Main public static void main (String[] args) {
    Scanner in = new Scanner(System.in);

    while (in.hasNext()) {
      int N = in.nextInt();
      int X = in.nextInt();
      int count = 1;
      int pos = 0;
      
      for (int i = 0; i < N; ++i) {
        pos += in.nextInt();

        if (pos <= X) {
          ++count;
        }
      }

      System.out.println(count);
    }
  } main {
    Scanner in = new Scanner(System.in);

    while (in.hasNext()) {
      int N = in.nextInt();
      int X = in.nextInt();
      int count = 1;
      int pos = 0;
      
      for (int i = 0; i < N; ++i) {
        pos += in.nextInt();

        if (pos <= X) {
          ++count;
        }
      }

      System.out.println(count);
    }
  } Scanner in = new Scanner(System.in); in new Scanner(System.in) while (in.hasNext()) {
      int N = in.nextInt();
      int X = in.nextInt();
      int count = 1;
      int pos = 0;
      
      for (int i = 0; i < N; ++i) {
        pos += in.nextInt();

        if (pos <= X) {
          ++count;
        }
      }

      System.out.println(count);
    } in.hasNext() in.hasNext in {
      int N = in.nextInt();
      int X = in.nextInt();
      int count = 1;
      int pos = 0;
      
      for (int i = 0; i < N; ++i) {
        pos += in.nextInt();

        if (pos <= X) {
          ++count;
        }
      }

      System.out.println(count);
    } int N = in.nextInt(); N in.nextInt() in.nextInt in int X = in.nextInt(); X in.nextInt() in.nextInt in int count = 1; count 1 int pos = 0; pos 0 for (int i = 0; i < N; ++i) {
        pos += in.nextInt();

        if (pos <= X) {
          ++count;
        }
      } int i = 0; int i = 0; i 0 i < N i N ++i ++i i {
        pos += in.nextInt();

        if (pos <= X) {
          ++count;
        }
      } {
        pos += in.nextInt();

        if (pos <= X) {
          ++count;
        }
      } pos += in.nextInt() pos in.nextInt() in.nextInt in if (pos <= X) {
          ++count;
        } pos <= X pos 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 in = new Scanner(System.in);

    while (in.hasNext()) {
      int N = in.nextInt();
      int X = in.nextInt();
      int count = 1;
      int pos = 0;
      
      for (int i = 0; i < N; ++i) {
        pos += in.nextInt();

        if (pos <= X) {
          ++count;
        }
      }

      System.out.println(count);
    }
  }
} public class Main {
  public static void main (String[] args) {
    Scanner in = new Scanner(System.in);

    while (in.hasNext()) {
      int N = in.nextInt();
      int X = in.nextInt();
      int count = 1;
      int pos = 0;
      
      for (int i = 0; i < N; ++i) {
        pos += in.nextInt();

        if (pos <= X) {
          ++count;
        }
      }

      System.out.println(count);
    }
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main (String[] args) {
    Scanner in = new Scanner(System.in);

    while (in.hasNext()) {
      int N = in.nextInt();
      int X = in.nextInt();
      int count = 1;
      int pos = 0;
      
      for (int i = 0; i < N; ++i) {
        pos += in.nextInt();

        if (pos <= X) {
          ++count;
        }
      }

      System.out.println(count);
    }
  }
}