import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] nx = scanner.nextLine().split(" ", 2);
        int n = Integer.parseInt(nx[0]);
        int x = Integer.parseInt(nx[1]);

        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = Integer.parseInt(scanner.nextLine());
        }
        Arrays.sort(arr);

        int donutsCount = 0;
        for (int i = 0; i < n; i++) {
            if (arr[i] <= x) {
                donutsCount++;
                x -= arr[i];
            } else {
                System.out.println(donutsCount);
                return;
            }
        }

        System.out.println(donutsCount + (x / arr[0]));
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] nx = scanner.nextLine().split(" ", 2);
        int n = Integer.parseInt(nx[0]);
        int x = Integer.parseInt(nx[1]);

        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = Integer.parseInt(scanner.nextLine());
        }
        Arrays.sort(arr);

        int donutsCount = 0;
        for (int i = 0; i < n; i++) {
            if (arr[i] <= x) {
                donutsCount++;
                x -= arr[i];
            } else {
                System.out.println(donutsCount);
                return;
            }
        }

        System.out.println(donutsCount + (x / arr[0]));
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] nx = scanner.nextLine().split(" ", 2);
        int n = Integer.parseInt(nx[0]);
        int x = Integer.parseInt(nx[1]);

        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = Integer.parseInt(scanner.nextLine());
        }
        Arrays.sort(arr);

        int donutsCount = 0;
        for (int i = 0; i < n; i++) {
            if (arr[i] <= x) {
                donutsCount++;
                x -= arr[i];
            } else {
                System.out.println(donutsCount);
                return;
            }
        }

        System.out.println(donutsCount + (x / arr[0]));
    } main {
        Scanner scanner = new Scanner(System.in);
        String[] nx = scanner.nextLine().split(" ", 2);
        int n = Integer.parseInt(nx[0]);
        int x = Integer.parseInt(nx[1]);

        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = Integer.parseInt(scanner.nextLine());
        }
        Arrays.sort(arr);

        int donutsCount = 0;
        for (int i = 0; i < n; i++) {
            if (arr[i] <= x) {
                donutsCount++;
                x -= arr[i];
            } else {
                System.out.println(donutsCount);
                return;
            }
        }

        System.out.println(donutsCount + (x / arr[0]));
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String[] nx = scanner.nextLine().split(" ", 2); nx scanner.nextLine().split(" ", 2) scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " 2 int n = Integer.parseInt(nx[0]); n Integer.parseInt(nx[0]) Integer.parseInt Integer nx[0] nx 0 int x = Integer.parseInt(nx[1]); x Integer.parseInt(nx[1]) Integer.parseInt Integer nx[1] nx 1 int[] arr = new int[n]; arr new int[n] n for (int i = 0; i < n; i++) {
            arr[i] = Integer.parseInt(scanner.nextLine());
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            arr[i] = Integer.parseInt(scanner.nextLine());
        } {
            arr[i] = Integer.parseInt(scanner.nextLine());
        } arr[i] = Integer.parseInt(scanner.nextLine()) arr[i] arr i Integer.parseInt(scanner.nextLine()) Integer.parseInt Integer scanner.nextLine() scanner.nextLine scanner Arrays.sort(arr) Arrays.sort Arrays arr int donutsCount = 0; donutsCount 0 for (int i = 0; i < n; i++) {
            if (arr[i] <= x) {
                donutsCount++;
                x -= arr[i];
            } else {
                System.out.println(donutsCount);
                return;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if (arr[i] <= x) {
                donutsCount++;
                x -= arr[i];
            } else {
                System.out.println(donutsCount);
                return;
            }
        } {
            if (arr[i] <= x) {
                donutsCount++;
                x -= arr[i];
            } else {
                System.out.println(donutsCount);
                return;
            }
        } if (arr[i] <= x) {
                donutsCount++;
                x -= arr[i];
            } else {
                System.out.println(donutsCount);
                return;
            } arr[i] <= x arr[i] arr i x {
                donutsCount++;
                x -= arr[i];
            } donutsCount++ donutsCount x -= arr[i] x arr[i] arr i {
                System.out.println(donutsCount);
                return;
            } System.out.println(donutsCount) System.out.println System.out System System.out donutsCount return; System.out.println(donutsCount + (x / arr[0])) System.out.println System.out System System.out donutsCount + (x / arr[0]) donutsCount (x / arr[0]) x arr[0] arr 0 String[] args args
import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] nx = scanner.nextLine().split(" ", 2);
        int n = Integer.parseInt(nx[0]);
        int x = Integer.parseInt(nx[1]);

        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = Integer.parseInt(scanner.nextLine());
        }
        Arrays.sort(arr);

        int donutsCount = 0;
        for (int i = 0; i < n; i++) {
            if (arr[i] <= x) {
                donutsCount++;
                x -= arr[i];
            } else {
                System.out.println(donutsCount);
                return;
            }
        }

        System.out.println(donutsCount + (x / arr[0]));
    }
}
