import java.util.*;

class Main{

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int x = sc.nextInt();
        int cnt = 0;

        int[] m = new int[n];
        for(int i = 0; i < n; i++){
            m[i] = sc.nextInt();
            if(x-m[i] >= 0){
                x -= m[i];
                cnt++;
            }
        }

        int max = 0;
        if(x != 0){
            for(int i = 0; i < n; i++){
                max = Math.max(max, x/m[i]);
            }
        }
        System.out.println(cnt+max);
        
        sc.close();
    }
} import java.util.*; util.* java class Main{

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int x = sc.nextInt();
        int cnt = 0;

        int[] m = new int[n];
        for(int i = 0; i < n; i++){
            m[i] = sc.nextInt();
            if(x-m[i] >= 0){
                x -= m[i];
                cnt++;
            }
        }

        int max = 0;
        if(x != 0){
            for(int i = 0; i < n; i++){
                max = Math.max(max, x/m[i]);
            }
        }
        System.out.println(cnt+max);
        
        sc.close();
    }
} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int x = sc.nextInt();
        int cnt = 0;

        int[] m = new int[n];
        for(int i = 0; i < n; i++){
            m[i] = sc.nextInt();
            if(x-m[i] >= 0){
                x -= m[i];
                cnt++;
            }
        }

        int max = 0;
        if(x != 0){
            for(int i = 0; i < n; i++){
                max = Math.max(max, x/m[i]);
            }
        }
        System.out.println(cnt+max);
        
        sc.close();
    } main {

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int x = sc.nextInt();
        int cnt = 0;

        int[] m = new int[n];
        for(int i = 0; i < n; i++){
            m[i] = sc.nextInt();
            if(x-m[i] >= 0){
                x -= m[i];
                cnt++;
            }
        }

        int max = 0;
        if(x != 0){
            for(int i = 0; i < n; i++){
                max = Math.max(max, x/m[i]);
            }
        }
        System.out.println(cnt+max);
        
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int cnt = 0; cnt 0 int[] m = new int[n]; m new int[n] n for(int i = 0; i < n; i++){
            m[i] = sc.nextInt();
            if(x-m[i] >= 0){
                x -= m[i];
                cnt++;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            m[i] = sc.nextInt();
            if(x-m[i] >= 0){
                x -= m[i];
                cnt++;
            }
        } {
            m[i] = sc.nextInt();
            if(x-m[i] >= 0){
                x -= m[i];
                cnt++;
            }
        } m[i] = sc.nextInt() m[i] m i sc.nextInt() sc.nextInt sc if(x-m[i] >= 0){
                x -= m[i];
                cnt++;
            } x-m[i] >= 0 x-m[i] x m[i] m i 0 {
                x -= m[i];
                cnt++;
            } x -= m[i] x m[i] m i cnt++ cnt int max = 0; max 0 if(x != 0){
            for(int i = 0; i < n; i++){
                max = Math.max(max, x/m[i]);
            }
        } x != 0 x 0 {
            for(int i = 0; i < n; i++){
                max = Math.max(max, x/m[i]);
            }
        } for(int i = 0; i < n; i++){
                max = Math.max(max, x/m[i]);
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                max = Math.max(max, x/m[i]);
            } {
                max = Math.max(max, x/m[i]);
            } max = Math.max(max, x/m[i]) max Math.max(max, x/m[i]) Math.max Math max x/m[i] x m[i] m i System.out.println(cnt+max) System.out.println System.out System System.out cnt+max cnt max sc.close() sc.close sc String[] args args
import java.util.*;

class Main{

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int x = sc.nextInt();
        int cnt = 0;

        int[] m = new int[n];
        for(int i = 0; i < n; i++){
            m[i] = sc.nextInt();
            if(x-m[i] >= 0){
                x -= m[i];
                cnt++;
            }
        }

        int max = 0;
        if(x != 0){
            for(int i = 0; i < n; i++){
                max = Math.max(max, x/m[i]);
            }
        }
        System.out.println(cnt+max);
        
        sc.close();
    }
}