import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N,X,num=0;
        N =sc.nextInt();
        X = sc.nextInt();
        int [] list = new int[N];
        for(int a=0;a<N;a++){
            list[a] = sc.nextInt();
        }
        Arrays.sort(list);
        for(int a=0;a<N;a++){
            X-= list[a];
            num++;
            if(X<0) break;
            }
        for(;;){
            if(X-list[0]>=0) {
                X -= list[0];
                num++;
            }
            else break;
        }
        System.out.println(num);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N,X,num=0;
        N =sc.nextInt();
        X = sc.nextInt();
        int [] list = new int[N];
        for(int a=0;a<N;a++){
            list[a] = sc.nextInt();
        }
        Arrays.sort(list);
        for(int a=0;a<N;a++){
            X-= list[a];
            num++;
            if(X<0) break;
            }
        for(;;){
            if(X-list[0]>=0) {
                X -= list[0];
                num++;
            }
            else break;
        }
        System.out.println(num);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N,X,num=0;
        N =sc.nextInt();
        X = sc.nextInt();
        int [] list = new int[N];
        for(int a=0;a<N;a++){
            list[a] = sc.nextInt();
        }
        Arrays.sort(list);
        for(int a=0;a<N;a++){
            X-= list[a];
            num++;
            if(X<0) break;
            }
        for(;;){
            if(X-list[0]>=0) {
                X -= list[0];
                num++;
            }
            else break;
        }
        System.out.println(num);
    } main {
        Scanner sc = new Scanner(System.in);
        int N,X,num=0;
        N =sc.nextInt();
        X = sc.nextInt();
        int [] list = new int[N];
        for(int a=0;a<N;a++){
            list[a] = sc.nextInt();
        }
        Arrays.sort(list);
        for(int a=0;a<N;a++){
            X-= list[a];
            num++;
            if(X<0) break;
            }
        for(;;){
            if(X-list[0]>=0) {
                X -= list[0];
                num++;
            }
            else break;
        }
        System.out.println(num);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N N X X num=0; num 0 N =sc.nextInt() N sc.nextInt() sc.nextInt sc X = sc.nextInt() X sc.nextInt() sc.nextInt sc int [] list = new int[N]; list new int[N] N for(int a=0;a<N;a++){
            list[a] = sc.nextInt();
        } int a=0; int a=0; a 0 a<N a N a++ a++ a {
            list[a] = sc.nextInt();
        } {
            list[a] = sc.nextInt();
        } list[a] = sc.nextInt() list[a] list a sc.nextInt() sc.nextInt sc Arrays.sort(list) Arrays.sort Arrays list for(int a=0;a<N;a++){
            X-= list[a];
            num++;
            if(X<0) break;
            } int a=0; int a=0; a 0 a<N a N a++ a++ a {
            X-= list[a];
            num++;
            if(X<0) break;
            } {
            X-= list[a];
            num++;
            if(X<0) break;
            } X-= list[a] X list[a] list a num++ num if(X<0) break; X<0 X 0 break; for(;;){
            if(X-list[0]>=0) {
                X -= list[0];
                num++;
            }
            else break;
        } ; {
            if(X-list[0]>=0) {
                X -= list[0];
                num++;
            }
            else break;
        } {
            if(X-list[0]>=0) {
                X -= list[0];
                num++;
            }
            else break;
        } if(X-list[0]>=0) {
                X -= list[0];
                num++;
            }
            else break; X-list[0]>=0 X-list[0] X list[0] list 0 0 {
                X -= list[0];
                num++;
            } X -= list[0] X list[0] list 0 num++ num break; System.out.println(num) System.out.println System.out System System.out num String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N,X,num=0;
        N =sc.nextInt();
        X = sc.nextInt();
        int [] list = new int[N];
        for(int a=0;a<N;a++){
            list[a] = sc.nextInt();
        }
        Arrays.sort(list);
        for(int a=0;a<N;a++){
            X-= list[a];
            num++;
            if(X<0) break;
            }
        for(;;){
            if(X-list[0]>=0) {
                X -= list[0];
                num++;
            }
            else break;
        }
        System.out.println(num);
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N,X,num=0;
        N =sc.nextInt();
        X = sc.nextInt();
        int [] list = new int[N];
        for(int a=0;a<N;a++){
            list[a] = sc.nextInt();
        }
        Arrays.sort(list);
        for(int a=0;a<N;a++){
            X-= list[a];
            num++;
            if(X<0) break;
            }
        for(;;){
            if(X-list[0]>=0) {
                X -= list[0];
                num++;
            }
            else break;
        }
        System.out.println(num);
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N,X,num=0;
        N =sc.nextInt();
        X = sc.nextInt();
        int [] list = new int[N];
        for(int a=0;a<N;a++){
            list[a] = sc.nextInt();
        }
        Arrays.sort(list);
        for(int a=0;a<N;a++){
            X-= list[a];
            num++;
            if(X<0) break;
            }
        for(;;){
            if(X-list[0]>=0) {
                X -= list[0];
                num++;
            }
            else break;
        }
        System.out.println(num);
    }
}