import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;


public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int ans = 0;
		int N = sc.nextInt();
		int X = sc.nextInt();
		List<Integer> donuts = new ArrayList<Integer>();

		for(int i=0;i<N;i++) {
			donuts.add(sc.nextInt());
		}
		Collections.sort(donuts, null);
		for(int j=0;j<N;j++) {
		if(X-donuts.get(j)>=0) {
			X=X-donuts.get(j);
			ans +=1;
		}

		}

		while(X-donuts.get(0)>=0) {
			X=X-donuts.get(0);
			ans +=1;
		}
		System.out.println(ans);
}
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int ans = 0;
		int N = sc.nextInt();
		int X = sc.nextInt();
		List<Integer> donuts = new ArrayList<Integer>();

		for(int i=0;i<N;i++) {
			donuts.add(sc.nextInt());
		}
		Collections.sort(donuts, null);
		for(int j=0;j<N;j++) {
		if(X-donuts.get(j)>=0) {
			X=X-donuts.get(j);
			ans +=1;
		}

		}

		while(X-donuts.get(0)>=0) {
			X=X-donuts.get(0);
			ans +=1;
		}
		System.out.println(ans);
}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int ans = 0;
		int N = sc.nextInt();
		int X = sc.nextInt();
		List<Integer> donuts = new ArrayList<Integer>();

		for(int i=0;i<N;i++) {
			donuts.add(sc.nextInt());
		}
		Collections.sort(donuts, null);
		for(int j=0;j<N;j++) {
		if(X-donuts.get(j)>=0) {
			X=X-donuts.get(j);
			ans +=1;
		}

		}

		while(X-donuts.get(0)>=0) {
			X=X-donuts.get(0);
			ans +=1;
		}
		System.out.println(ans);
} main {

		Scanner sc = new Scanner(System.in);

		int ans = 0;
		int N = sc.nextInt();
		int X = sc.nextInt();
		List<Integer> donuts = new ArrayList<Integer>();

		for(int i=0;i<N;i++) {
			donuts.add(sc.nextInt());
		}
		Collections.sort(donuts, null);
		for(int j=0;j<N;j++) {
		if(X-donuts.get(j)>=0) {
			X=X-donuts.get(j);
			ans +=1;
		}

		}

		while(X-donuts.get(0)>=0) {
			X=X-donuts.get(0);
			ans +=1;
		}
		System.out.println(ans);
} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int ans = 0; ans 0 int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc List<Integer> donuts = new ArrayList<Integer>(); donuts new ArrayList<Integer>() for(int i=0;i<N;i++) {
			donuts.add(sc.nextInt());
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			donuts.add(sc.nextInt());
		} {
			donuts.add(sc.nextInt());
		} donuts.add(sc.nextInt()) donuts.add donuts sc.nextInt() sc.nextInt sc Collections.sort(donuts, null) Collections.sort Collections donuts null for(int j=0;j<N;j++) {
		if(X-donuts.get(j)>=0) {
			X=X-donuts.get(j);
			ans +=1;
		}

		} int j=0; int j=0; j 0 j<N j N j++ j++ j {
		if(X-donuts.get(j)>=0) {
			X=X-donuts.get(j);
			ans +=1;
		}

		} {
		if(X-donuts.get(j)>=0) {
			X=X-donuts.get(j);
			ans +=1;
		}

		} if(X-donuts.get(j)>=0) {
			X=X-donuts.get(j);
			ans +=1;
		} X-donuts.get(j)>=0 X-donuts.get(j) X donuts.get(j) donuts.get donuts j 0 {
			X=X-donuts.get(j);
			ans +=1;
		} X=X-donuts.get(j) X X-donuts.get(j) X donuts.get(j) donuts.get donuts j ans +=1 ans 1 while(X-donuts.get(0)>=0) {
			X=X-donuts.get(0);
			ans +=1;
		} X-donuts.get(0)>=0 X-donuts.get(0) X donuts.get(0) donuts.get donuts 0 0 {
			X=X-donuts.get(0);
			ans +=1;
		} X=X-donuts.get(0) X X-donuts.get(0) X donuts.get(0) donuts.get donuts 0 ans +=1 ans 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 sc = new Scanner(System.in);

		int ans = 0;
		int N = sc.nextInt();
		int X = sc.nextInt();
		List<Integer> donuts = new ArrayList<Integer>();

		for(int i=0;i<N;i++) {
			donuts.add(sc.nextInt());
		}
		Collections.sort(donuts, null);
		for(int j=0;j<N;j++) {
		if(X-donuts.get(j)>=0) {
			X=X-donuts.get(j);
			ans +=1;
		}

		}

		while(X-donuts.get(0)>=0) {
			X=X-donuts.get(0);
			ans +=1;
		}
		System.out.println(ans);
}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int ans = 0;
		int N = sc.nextInt();
		int X = sc.nextInt();
		List<Integer> donuts = new ArrayList<Integer>();

		for(int i=0;i<N;i++) {
			donuts.add(sc.nextInt());
		}
		Collections.sort(donuts, null);
		for(int j=0;j<N;j++) {
		if(X-donuts.get(j)>=0) {
			X=X-donuts.get(j);
			ans +=1;
		}

		}

		while(X-donuts.get(0)>=0) {
			X=X-donuts.get(0);
			ans +=1;
		}
		System.out.println(ans);
}
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;


public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int ans = 0;
		int N = sc.nextInt();
		int X = sc.nextInt();
		List<Integer> donuts = new ArrayList<Integer>();

		for(int i=0;i<N;i++) {
			donuts.add(sc.nextInt());
		}
		Collections.sort(donuts, null);
		for(int j=0;j<N;j++) {
		if(X-donuts.get(j)>=0) {
			X=X-donuts.get(j);
			ans +=1;
		}

		}

		while(X-donuts.get(0)>=0) {
			X=X-donuts.get(0);
			ans +=1;
		}
		System.out.println(ans);
}
}