import java.io.*;
import java.util.*;

public class standing_rs implements Runnable {
    private BufferedReader in;
    private PrintWriter out;
    
    private void check(boolean expr, String msg) {
        if (!expr) {
            throw new Error(msg);
        }
    }
    
    private void checkBounds(int n, int low, int hi, String nStr) {
        check((low <= n) && (n <= hi), nStr + " is not in [" + low + ", " + hi + "]");
    }
    
    private void solve() throws IOException {
        StringTokenizer st = new StringTokenizer(in.readLine());
        int n = Integer.parseInt(st.nextToken());
        int m = Integer.parseInt(st.nextToken());
        checkBounds(n, 1, 100, "n");
        checkBounds(m, 1, 1000000000, "m");
        
        st = new StringTokenizer(in.readLine());
        int answer = 0;
        int prev = m;
        for (int i = 0; i < n; i++) {
            int u = Integer.parseInt(st.nextToken());
            checkBounds(u, 0, m, "solved[i]");
            check(u == 0 || m % u == 0, "Solved problem is not divisor of number of problems");
            check(prev >= u, "sequence is not non-increasing");
            prev = u;
            while (u == 0 || m % u == 0) {
                answer++;
                u++;
            }
        }
        out.println(answer - n);
    }
    
    public static void main(String[] args) {
        new Thread(new standing_rs()).start();
    }

    public void run() {
        String problem = getClass().getName().split("_")[0];
        try {
            in = new BufferedReader(new FileReader(new File(problem + ".in")));
            out = new PrintWriter(new File(problem + ".out"));
            solve();
            in.close();
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
}
