import java.util.*;

public class Main {
    static long mod = 1000000007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] lis = new int[n + 1];

        for (int i = 0; i < m; ++i) {
            lis[sc.nextInt()] = 1;
        }

        long[] cnt = new long[n + 1];
        cnt[0] = 1;
        if (lis[1] == 1) {
            cnt[1] = 0;
        } else {
            cnt[1] = 1;
        }
        for (int i = 2; i <= n; ++i) {
            if (lis[i] == 1) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % mod;
            }
        }

        System.out.println(cnt[n]);
    }
} import java.util.*; util.* java public class Main {
    static long mod = 1000000007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] lis = new int[n + 1];

        for (int i = 0; i < m; ++i) {
            lis[sc.nextInt()] = 1;
        }

        long[] cnt = new long[n + 1];
        cnt[0] = 1;
        if (lis[1] == 1) {
            cnt[1] = 0;
        } else {
            cnt[1] = 1;
        }
        for (int i = 2; i <= n; ++i) {
            if (lis[i] == 1) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % mod;
            }
        }

        System.out.println(cnt[n]);
    }
} Main static long mod = 1000000007; mod 1000000007 public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] lis = new int[n + 1];

        for (int i = 0; i < m; ++i) {
            lis[sc.nextInt()] = 1;
        }

        long[] cnt = new long[n + 1];
        cnt[0] = 1;
        if (lis[1] == 1) {
            cnt[1] = 0;
        } else {
            cnt[1] = 1;
        }
        for (int i = 2; i <= n; ++i) {
            if (lis[i] == 1) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % mod;
            }
        }

        System.out.println(cnt[n]);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] lis = new int[n + 1];

        for (int i = 0; i < m; ++i) {
            lis[sc.nextInt()] = 1;
        }

        long[] cnt = new long[n + 1];
        cnt[0] = 1;
        if (lis[1] == 1) {
            cnt[1] = 0;
        } else {
            cnt[1] = 1;
        }
        for (int i = 2; i <= n; ++i) {
            if (lis[i] == 1) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % mod;
            }
        }

        System.out.println(cnt[n]);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int[] lis = new int[n + 1]; lis new int[n + 1] n + 1 n 1 for (int i = 0; i < m; ++i) {
            lis[sc.nextInt()] = 1;
        } int i = 0; int i = 0; i 0 i < m i m ++i ++i i {
            lis[sc.nextInt()] = 1;
        } {
            lis[sc.nextInt()] = 1;
        } lis[sc.nextInt()] = 1 lis[sc.nextInt()] lis sc.nextInt() sc.nextInt sc 1 long[] cnt = new long[n + 1]; cnt new long[n + 1] n + 1 n 1 cnt[0] = 1 cnt[0] cnt 0 1 if (lis[1] == 1) {
            cnt[1] = 0;
        } else {
            cnt[1] = 1;
        } lis[1] == 1 lis[1] lis 1 1 {
            cnt[1] = 0;
        } cnt[1] = 0 cnt[1] cnt 1 0 {
            cnt[1] = 1;
        } cnt[1] = 1 cnt[1] cnt 1 1 for (int i = 2; i <= n; ++i) {
            if (lis[i] == 1) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % mod;
            }
        } int i = 2; int i = 2; i 2 i <= n i n ++i ++i i {
            if (lis[i] == 1) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % mod;
            }
        } {
            if (lis[i] == 1) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % mod;
            }
        } if (lis[i] == 1) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % mod;
            } lis[i] == 1 lis[i] lis i 1 {
                cnt[i] = 0;
            } cnt[i] = 0 cnt[i] cnt i 0 {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % mod;
            } cnt[i] = (cnt[i - 1] + cnt[i - 2]) % mod cnt[i] cnt i (cnt[i - 1] + cnt[i - 2]) % mod (cnt[i - 1] + cnt[i - 2]) cnt[i - 1] cnt i - 1 i 1 cnt[i - 2] cnt i - 2 i 2 mod System.out.println(cnt[n]) System.out.println System.out System System.out cnt[n] cnt n String[] args args public class Main {
    static long mod = 1000000007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] lis = new int[n + 1];

        for (int i = 0; i < m; ++i) {
            lis[sc.nextInt()] = 1;
        }

        long[] cnt = new long[n + 1];
        cnt[0] = 1;
        if (lis[1] == 1) {
            cnt[1] = 0;
        } else {
            cnt[1] = 1;
        }
        for (int i = 2; i <= n; ++i) {
            if (lis[i] == 1) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % mod;
            }
        }

        System.out.println(cnt[n]);
    }
} public class Main {
    static long mod = 1000000007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] lis = new int[n + 1];

        for (int i = 0; i < m; ++i) {
            lis[sc.nextInt()] = 1;
        }

        long[] cnt = new long[n + 1];
        cnt[0] = 1;
        if (lis[1] == 1) {
            cnt[1] = 0;
        } else {
            cnt[1] = 1;
        }
        for (int i = 2; i <= n; ++i) {
            if (lis[i] == 1) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % mod;
            }
        }

        System.out.println(cnt[n]);
    }
} Main
import java.util.*;

public class Main {
    static long mod = 1000000007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] lis = new int[n + 1];

        for (int i = 0; i < m; ++i) {
            lis[sc.nextInt()] = 1;
        }

        long[] cnt = new long[n + 1];
        cnt[0] = 1;
        if (lis[1] == 1) {
            cnt[1] = 0;
        } else {
            cnt[1] = 1;
        }
        for (int i = 2; i <= n; ++i) {
            if (lis[i] == 1) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % mod;
            }
        }

        System.out.println(cnt[n]);
    }
}
