import java.util.*;

public class Main
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int m = sc.nextInt();
        final long mod = 1000000007;
        boolean []broken = new boolean[n+1];
        Arrays.fill(broken,false);
        for (int i = 0;i<m;++i)
        {
            int a = sc.nextInt();
            broken[a] = true;
        }

        long [] dp = new long[n+2];
        dp[n] = 1;
        for (int now = n-1;now >= 0;--now)
        {
            if (broken[now])
            {
                dp[now] = 0;
                continue;
            }
            dp[now] = (dp[now+1]+dp[now+2]) % mod;
            //debug
//            StringBuilder sb = new StringBuilder();
//            for (int i = 0;i<dp.length;++i) sb.append(dp[i]+",");
//            System.out.println(sb.toString());
//            System.out.println("--------------------");
            //end debug
        }
        System.out.println(dp[0]);
        sc.close();
    }
} import java.util.*; util.* java public class Main
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int m = sc.nextInt();
        final long mod = 1000000007;
        boolean []broken = new boolean[n+1];
        Arrays.fill(broken,false);
        for (int i = 0;i<m;++i)
        {
            int a = sc.nextInt();
            broken[a] = true;
        }

        long [] dp = new long[n+2];
        dp[n] = 1;
        for (int now = n-1;now >= 0;--now)
        {
            if (broken[now])
            {
                dp[now] = 0;
                continue;
            }
            dp[now] = (dp[now+1]+dp[now+2]) % mod;
            //debug
//            StringBuilder sb = new StringBuilder();
//            for (int i = 0;i<dp.length;++i) sb.append(dp[i]+",");
//            System.out.println(sb.toString());
//            System.out.println("--------------------");
            //end debug
        }
        System.out.println(dp[0]);
        sc.close();
    }
} Main public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int m = sc.nextInt();
        final long mod = 1000000007;
        boolean []broken = new boolean[n+1];
        Arrays.fill(broken,false);
        for (int i = 0;i<m;++i)
        {
            int a = sc.nextInt();
            broken[a] = true;
        }

        long [] dp = new long[n+2];
        dp[n] = 1;
        for (int now = n-1;now >= 0;--now)
        {
            if (broken[now])
            {
                dp[now] = 0;
                continue;
            }
            dp[now] = (dp[now+1]+dp[now+2]) % mod;
            //debug
//            StringBuilder sb = new StringBuilder();
//            for (int i = 0;i<dp.length;++i) sb.append(dp[i]+",");
//            System.out.println(sb.toString());
//            System.out.println("--------------------");
            //end debug
        }
        System.out.println(dp[0]);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int m = sc.nextInt();
        final long mod = 1000000007;
        boolean []broken = new boolean[n+1];
        Arrays.fill(broken,false);
        for (int i = 0;i<m;++i)
        {
            int a = sc.nextInt();
            broken[a] = true;
        }

        long [] dp = new long[n+2];
        dp[n] = 1;
        for (int now = n-1;now >= 0;--now)
        {
            if (broken[now])
            {
                dp[now] = 0;
                continue;
            }
            dp[now] = (dp[now+1]+dp[now+2]) % mod;
            //debug
//            StringBuilder sb = new StringBuilder();
//            for (int i = 0;i<dp.length;++i) sb.append(dp[i]+",");
//            System.out.println(sb.toString());
//            System.out.println("--------------------");
            //end debug
        }
        System.out.println(dp[0]);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc final int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc final long mod = 1000000007; mod 1000000007 boolean []broken = new boolean[n+1]; broken new boolean[n+1] n+1 n 1 Arrays.fill(broken,false) Arrays.fill Arrays broken false for (int i = 0;i<m;++i)
        {
            int a = sc.nextInt();
            broken[a] = true;
        } int i = 0; int i = 0; i 0 i<m i m ++i ++i i {
            int a = sc.nextInt();
            broken[a] = true;
        } {
            int a = sc.nextInt();
            broken[a] = true;
        } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc broken[a] = true broken[a] broken a true long [] dp = new long[n+2]; dp new long[n+2] n+2 n 2 dp[n] = 1 dp[n] dp n 1 for (int now = n-1;now >= 0;--now)
        {
            if (broken[now])
            {
                dp[now] = 0;
                continue;
            }
            dp[now] = (dp[now+1]+dp[now+2]) % mod;
            //debug
//            StringBuilder sb = new StringBuilder();
//            for (int i = 0;i<dp.length;++i) sb.append(dp[i]+",");
//            System.out.println(sb.toString());
//            System.out.println("--------------------");
            //end debug
        } int now = n-1; int now = n-1; now n-1 n 1 now >= 0 now 0 --now --now now {
            if (broken[now])
            {
                dp[now] = 0;
                continue;
            }
            dp[now] = (dp[now+1]+dp[now+2]) % mod;
            //debug
//            StringBuilder sb = new StringBuilder();
//            for (int i = 0;i<dp.length;++i) sb.append(dp[i]+",");
//            System.out.println(sb.toString());
//            System.out.println("--------------------");
            //end debug
        } {
            if (broken[now])
            {
                dp[now] = 0;
                continue;
            }
            dp[now] = (dp[now+1]+dp[now+2]) % mod;
            //debug
//            StringBuilder sb = new StringBuilder();
//            for (int i = 0;i<dp.length;++i) sb.append(dp[i]+",");
//            System.out.println(sb.toString());
//            System.out.println("--------------------");
            //end debug
        } if (broken[now])
            {
                dp[now] = 0;
                continue;
            } broken[now] broken now {
                dp[now] = 0;
                continue;
            } dp[now] = 0 dp[now] dp now 0 continue; dp[now] = (dp[now+1]+dp[now+2]) % mod dp[now] dp now (dp[now+1]+dp[now+2]) % mod (dp[now+1]+dp[now+2]) dp[now+1] dp now+1 now 1 dp[now+2] dp now+2 now 2 mod System.out.println(dp[0]) System.out.println System.out System System.out dp[0] dp 0 sc.close() sc.close sc String[] args args public class Main
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int m = sc.nextInt();
        final long mod = 1000000007;
        boolean []broken = new boolean[n+1];
        Arrays.fill(broken,false);
        for (int i = 0;i<m;++i)
        {
            int a = sc.nextInt();
            broken[a] = true;
        }

        long [] dp = new long[n+2];
        dp[n] = 1;
        for (int now = n-1;now >= 0;--now)
        {
            if (broken[now])
            {
                dp[now] = 0;
                continue;
            }
            dp[now] = (dp[now+1]+dp[now+2]) % mod;
            //debug
//            StringBuilder sb = new StringBuilder();
//            for (int i = 0;i<dp.length;++i) sb.append(dp[i]+",");
//            System.out.println(sb.toString());
//            System.out.println("--------------------");
            //end debug
        }
        System.out.println(dp[0]);
        sc.close();
    }
} public class Main
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int m = sc.nextInt();
        final long mod = 1000000007;
        boolean []broken = new boolean[n+1];
        Arrays.fill(broken,false);
        for (int i = 0;i<m;++i)
        {
            int a = sc.nextInt();
            broken[a] = true;
        }

        long [] dp = new long[n+2];
        dp[n] = 1;
        for (int now = n-1;now >= 0;--now)
        {
            if (broken[now])
            {
                dp[now] = 0;
                continue;
            }
            dp[now] = (dp[now+1]+dp[now+2]) % mod;
            //debug
//            StringBuilder sb = new StringBuilder();
//            for (int i = 0;i<dp.length;++i) sb.append(dp[i]+",");
//            System.out.println(sb.toString());
//            System.out.println("--------------------");
            //end debug
        }
        System.out.println(dp[0]);
        sc.close();
    }
} Main
import java.util.*;

public class Main
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int m = sc.nextInt();
        final long mod = 1000000007;
        boolean []broken = new boolean[n+1];
        Arrays.fill(broken,false);
        for (int i = 0;i<m;++i)
        {
            int a = sc.nextInt();
            broken[a] = true;
        }

        long [] dp = new long[n+2];
        dp[n] = 1;
        for (int now = n-1;now >= 0;--now)
        {
            if (broken[now])
            {
                dp[now] = 0;
                continue;
            }
            dp[now] = (dp[now+1]+dp[now+2]) % mod;
            //debug
//            StringBuilder sb = new StringBuilder();
//            for (int i = 0;i<dp.length;++i) sb.append(dp[i]+",");
//            System.out.println(sb.toString());
//            System.out.println("--------------------");
            //end debug
        }
        System.out.println(dp[0]);
        sc.close();
    }
}