import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int have = sc.nextInt();
        int[] array = new int[num];
        int min = 1001;
        int minIndex = -1;
        int count = -1;

        for(int i=0; i<num; i++){
            int a = sc.nextInt();
            array[i] = a;
            if(a < min){
                min = a;
                minIndex = i;
            }
            have -= a;
            count++;
        }

        while(have >= 0){
            have -= array[minIndex];
            count++;
        }

        System.out.println(count);
    }

    public static void printArray(int[] array){
        for(int i=0; i<array.length; i++){
            if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            }
        }
    }

    public static int gcd(int a, int b){
        if (b == 0) return a;
        return gcd(b, a % b);
    }

    public static int lcm(int a, int b){
        return a * b / gcd(a, b);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int have = sc.nextInt();
        int[] array = new int[num];
        int min = 1001;
        int minIndex = -1;
        int count = -1;

        for(int i=0; i<num; i++){
            int a = sc.nextInt();
            array[i] = a;
            if(a < min){
                min = a;
                minIndex = i;
            }
            have -= a;
            count++;
        }

        while(have >= 0){
            have -= array[minIndex];
            count++;
        }

        System.out.println(count);
    }

    public static void printArray(int[] array){
        for(int i=0; i<array.length; i++){
            if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            }
        }
    }

    public static int gcd(int a, int b){
        if (b == 0) return a;
        return gcd(b, a % b);
    }

    public static int lcm(int a, int b){
        return a * b / gcd(a, b);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int have = sc.nextInt();
        int[] array = new int[num];
        int min = 1001;
        int minIndex = -1;
        int count = -1;

        for(int i=0; i<num; i++){
            int a = sc.nextInt();
            array[i] = a;
            if(a < min){
                min = a;
                minIndex = i;
            }
            have -= a;
            count++;
        }

        while(have >= 0){
            have -= array[minIndex];
            count++;
        }

        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int have = sc.nextInt();
        int[] array = new int[num];
        int min = 1001;
        int minIndex = -1;
        int count = -1;

        for(int i=0; i<num; i++){
            int a = sc.nextInt();
            array[i] = a;
            if(a < min){
                min = a;
                minIndex = i;
            }
            have -= a;
            count++;
        }

        while(have >= 0){
            have -= array[minIndex];
            count++;
        }

        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc int have = sc.nextInt(); have sc.nextInt() sc.nextInt sc int[] array = new int[num]; array new int[num] num int min = 1001; min 1001 int minIndex = -1; minIndex -1 1 int count = -1; count -1 1 for(int i=0; i<num; i++){
            int a = sc.nextInt();
            array[i] = a;
            if(a < min){
                min = a;
                minIndex = i;
            }
            have -= a;
            count++;
        } int i=0; int i=0; i 0 i<num i num i++ i++ i {
            int a = sc.nextInt();
            array[i] = a;
            if(a < min){
                min = a;
                minIndex = i;
            }
            have -= a;
            count++;
        } {
            int a = sc.nextInt();
            array[i] = a;
            if(a < min){
                min = a;
                minIndex = i;
            }
            have -= a;
            count++;
        } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc array[i] = a array[i] array i a if(a < min){
                min = a;
                minIndex = i;
            } a < min a min {
                min = a;
                minIndex = i;
            } min = a min a minIndex = i minIndex i have -= a have a count++ count while(have >= 0){
            have -= array[minIndex];
            count++;
        } have >= 0 have 0 {
            have -= array[minIndex];
            count++;
        } have -= array[minIndex] have array[minIndex] array minIndex count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public static void printArray(int[] array){
        for(int i=0; i<array.length; i++){
            if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            }
        }
    } printArray {
        for(int i=0; i<array.length; i++){
            if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            }
        }
    } for(int i=0; i<array.length; i++){
            if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            }
        } int i=0; int i=0; i 0 i<array.length i array.length array array.length i++ i++ i {
            if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            }
        } {
            if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            }
        } if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            } i == array.length i array.length array array.length {
                System.out.println(array[i]);
            } System.out.println(array[i]) System.out.println System.out System System.out array[i] array i {
                System.out.print(String.format("%d ", array[i]));
            } System.out.print(String.format("%d ", array[i])) System.out.print System.out System System.out String.format("%d ", array[i]) String.format String "%d " array[i] array i int[] array array public static int gcd(int a, int b){
        if (b == 0) return a;
        return gcd(b, a % b);
    } gcd {
        if (b == 0) return a;
        return gcd(b, a % b);
    } if (b == 0) return a; b == 0 b 0 return a; a return gcd(b, a % b); gcd(b, a % b) gcd b a % b a b int a a int b b public static int lcm(int a, int b){
        return a * b / gcd(a, b);
    } lcm {
        return a * b / gcd(a, b);
    } return a * b / gcd(a, b); a * b / gcd(a, b) a * b a b gcd(a, b) gcd a b int a a int b b public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int have = sc.nextInt();
        int[] array = new int[num];
        int min = 1001;
        int minIndex = -1;
        int count = -1;

        for(int i=0; i<num; i++){
            int a = sc.nextInt();
            array[i] = a;
            if(a < min){
                min = a;
                minIndex = i;
            }
            have -= a;
            count++;
        }

        while(have >= 0){
            have -= array[minIndex];
            count++;
        }

        System.out.println(count);
    }

    public static void printArray(int[] array){
        for(int i=0; i<array.length; i++){
            if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            }
        }
    }

    public static int gcd(int a, int b){
        if (b == 0) return a;
        return gcd(b, a % b);
    }

    public static int lcm(int a, int b){
        return a * b / gcd(a, b);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int have = sc.nextInt();
        int[] array = new int[num];
        int min = 1001;
        int minIndex = -1;
        int count = -1;

        for(int i=0; i<num; i++){
            int a = sc.nextInt();
            array[i] = a;
            if(a < min){
                min = a;
                minIndex = i;
            }
            have -= a;
            count++;
        }

        while(have >= 0){
            have -= array[minIndex];
            count++;
        }

        System.out.println(count);
    }

    public static void printArray(int[] array){
        for(int i=0; i<array.length; i++){
            if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            }
        }
    }

    public static int gcd(int a, int b){
        if (b == 0) return a;
        return gcd(b, a % b);
    }

    public static int lcm(int a, int b){
        return a * b / gcd(a, b);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int have = sc.nextInt();
        int[] array = new int[num];
        int min = 1001;
        int minIndex = -1;
        int count = -1;

        for(int i=0; i<num; i++){
            int a = sc.nextInt();
            array[i] = a;
            if(a < min){
                min = a;
                minIndex = i;
            }
            have -= a;
            count++;
        }

        while(have >= 0){
            have -= array[minIndex];
            count++;
        }

        System.out.println(count);
    }

    public static void printArray(int[] array){
        for(int i=0; i<array.length; i++){
            if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            }
        }
    }

    public static int gcd(int a, int b){
        if (b == 0) return a;
        return gcd(b, a % b);
    }

    public static int lcm(int a, int b){
        return a * b / gcd(a, b);
    }
}
