import java.util.*;
import java.io.*;

public class Main
{
	public static void main(String [] Args)
	{
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int x=in.nextInt();
		int ans=0;
		int i;
		for(i=0;i<n;i++)
		{
			int l=in.nextInt();
			ans=ans+l;
			if(ans>x)
			{
				break;
			}
		}
		System.out.println(i+1);
	}
}
	 import java.util.*; util.* java import java.io.*; io.* java public class Main
{
	public static void main(String [] Args)
	{
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int x=in.nextInt();
		int ans=0;
		int i;
		for(i=0;i<n;i++)
		{
			int l=in.nextInt();
			ans=ans+l;
			if(ans>x)
			{
				break;
			}
		}
		System.out.println(i+1);
	}
} Main public static void main(String [] Args)
	{
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int x=in.nextInt();
		int ans=0;
		int i;
		for(i=0;i<n;i++)
		{
			int l=in.nextInt();
			ans=ans+l;
			if(ans>x)
			{
				break;
			}
		}
		System.out.println(i+1);
	} main {
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int x=in.nextInt();
		int ans=0;
		int i;
		for(i=0;i<n;i++)
		{
			int l=in.nextInt();
			ans=ans+l;
			if(ans>x)
			{
				break;
			}
		}
		System.out.println(i+1);
	} Scanner in=new Scanner(System.in); in new Scanner(System.in) int n=in.nextInt(); n in.nextInt() in.nextInt in int x=in.nextInt(); x in.nextInt() in.nextInt in int ans=0; ans 0 int i; i for(i=0;i<n;i++)
		{
			int l=in.nextInt();
			ans=ans+l;
			if(ans>x)
			{
				break;
			}
		} i=0; i=0 i 0 i<n i n i++ i++ i {
			int l=in.nextInt();
			ans=ans+l;
			if(ans>x)
			{
				break;
			}
		} {
			int l=in.nextInt();
			ans=ans+l;
			if(ans>x)
			{
				break;
			}
		} int l=in.nextInt(); l in.nextInt() in.nextInt in ans=ans+l ans ans+l ans l if(ans>x)
			{
				break;
			} ans>x ans x {
				break;
			} break; System.out.println(i+1) System.out.println System.out System System.out i+1 i 1 String [] Args Args public class Main
{
	public static void main(String [] Args)
	{
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int x=in.nextInt();
		int ans=0;
		int i;
		for(i=0;i<n;i++)
		{
			int l=in.nextInt();
			ans=ans+l;
			if(ans>x)
			{
				break;
			}
		}
		System.out.println(i+1);
	}
} public class Main
{
	public static void main(String [] Args)
	{
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int x=in.nextInt();
		int ans=0;
		int i;
		for(i=0;i<n;i++)
		{
			int l=in.nextInt();
			ans=ans+l;
			if(ans>x)
			{
				break;
			}
		}
		System.out.println(i+1);
	}
} Main
import java.util.*;
import java.io.*;

public class Main
{
	public static void main(String [] Args)
	{
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int x=in.nextInt();
		int ans=0;
		int i;
		for(i=0;i<n;i++)
		{
			int l=in.nextInt();
			ans=ans+l;
			if(ans>x)
			{
				break;
			}
		}
		System.out.println(i+1);
	}
}
	