
import java.util.Arrays;
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int moto = sc.nextInt();
        int[] cake = new int[N];
        int ans = 0;
        
        
       for (int i = 0; i < N; i++) {
		cake[i] = sc.nextInt();
		if(moto >= cake[i]) {
		moto -= cake[i];
		ans++;
		}
		}
       
       sc.close();
       Arrays.sort(cake);
       
       while(moto >= cake[0]) {
    	   moto -= cake[0];
    	   ans++;
       }
       System.out.println(ans);
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int moto = sc.nextInt();
        int[] cake = new int[N];
        int ans = 0;
        
        
       for (int i = 0; i < N; i++) {
		cake[i] = sc.nextInt();
		if(moto >= cake[i]) {
		moto -= cake[i];
		ans++;
		}
		}
       
       sc.close();
       Arrays.sort(cake);
       
       while(moto >= cake[0]) {
    	   moto -= cake[0];
    	   ans++;
       }
       System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int moto = sc.nextInt();
        int[] cake = new int[N];
        int ans = 0;
        
        
       for (int i = 0; i < N; i++) {
		cake[i] = sc.nextInt();
		if(moto >= cake[i]) {
		moto -= cake[i];
		ans++;
		}
		}
       
       sc.close();
       Arrays.sort(cake);
       
       while(moto >= cake[0]) {
    	   moto -= cake[0];
    	   ans++;
       }
       System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int moto = sc.nextInt();
        int[] cake = new int[N];
        int ans = 0;
        
        
       for (int i = 0; i < N; i++) {
		cake[i] = sc.nextInt();
		if(moto >= cake[i]) {
		moto -= cake[i];
		ans++;
		}
		}
       
       sc.close();
       Arrays.sort(cake);
       
       while(moto >= cake[0]) {
    	   moto -= cake[0];
    	   ans++;
       }
       System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int moto = sc.nextInt(); moto sc.nextInt() sc.nextInt sc int[] cake = new int[N]; cake new int[N] N int ans = 0; ans 0 for (int i = 0; i < N; i++) {
		cake[i] = sc.nextInt();
		if(moto >= cake[i]) {
		moto -= cake[i];
		ans++;
		}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
		cake[i] = sc.nextInt();
		if(moto >= cake[i]) {
		moto -= cake[i];
		ans++;
		}
		} {
		cake[i] = sc.nextInt();
		if(moto >= cake[i]) {
		moto -= cake[i];
		ans++;
		}
		} cake[i] = sc.nextInt() cake[i] cake i sc.nextInt() sc.nextInt sc if(moto >= cake[i]) {
		moto -= cake[i];
		ans++;
		} moto >= cake[i] moto cake[i] cake i {
		moto -= cake[i];
		ans++;
		} moto -= cake[i] moto cake[i] cake i ans++ ans sc.close() sc.close sc Arrays.sort(cake) Arrays.sort Arrays cake while(moto >= cake[0]) {
    	   moto -= cake[0];
    	   ans++;
       } moto >= cake[0] moto cake[0] cake 0 {
    	   moto -= cake[0];
    	   ans++;
       } moto -= cake[0] moto cake[0] cake 0 ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args

import java.util.Arrays;
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int moto = sc.nextInt();
        int[] cake = new int[N];
        int ans = 0;
        
        
       for (int i = 0; i < N; i++) {
		cake[i] = sc.nextInt();
		if(moto >= cake[i]) {
		moto -= cake[i];
		ans++;
		}
		}
       
       sc.close();
       Arrays.sort(cake);
       
       while(moto >= cake[0]) {
    	   moto -= cake[0];
    	   ans++;
       }
       System.out.println(ans);
    }
}