import java.io.PrintStream;
import java.util.Scanner;

public class Main {
    static final Scanner     sc = new Scanner(System.in);
    static final PrintStream so = System.out;
    static int MOD = (int)1E9 + 7;
    public static void main(String[] args) {
        int n = ni();
        long[] s = new long[n+1];
        s[0] = 1;
        s[1] = 1;
        for (int i = 2; i <= n; i++) {
            s[i] = s[i-1] + s[i-2];
            s[i] %= MOD;
        }
        
        int m = ni();
        if (m == 0) {
            so.println(s[n]);
            return;
        }
        
        int[] a = new int[m + 2];
        for (int i = 1; i <= m; i++) {
            a[i] = ni();
        }
        a[m+1] = n+1;
        long ans = s[a[1]-1];
        
        for (int i = 2; i <= m+1; i++) {
            int diff = a[i] - a[i-1] - 2;
            if (diff < 0) {
                so.println(0);
                return;
            }
            
            ans *= s[diff];
            ans %= MOD;
        }
        so.println(ans);
    }
    
    
    static int gcd(int m, int n) {
        if(m < n) return gcd(n, m);
        if(n == 0) return m;
        return gcd(n, m % n);
    }
    
    static long lcm(int m, int n) {
        return (long) m * n / gcd(m, n);
    }

    private static long nl() {
        return sc.nextLong();
    }

    private static int ni() {
        return sc.nextInt();
    }

    private static String ns() {
        return sc.next();
    }

    private static char[] nsToChars() {
        return sc.next().toCharArray();
    }

    private static long[] nlongs(int n) {
        return nlongs(n, 0);
    }
    private static int[] nints(int n) {
        return nints(n, 0);
    }

    private static long[] nlongs(int n, int offset) {
        long[] a = new long[offset + n];
        for (int i = 0; i < n; i++)
            a[offset + i] = nl();
        return a;
    }

    private static int[] nints(int n, int offset) {
        int[] a = new int[offset + n];
        for (int i = 0; i < n; i++)
            a[offset + i] = ni();
        return a;
    }
} import java.io.PrintStream; PrintStream java.io import java.util.Scanner; Scanner java.util public class Main {
    static final Scanner     sc = new Scanner(System.in);
    static final PrintStream so = System.out;
    static int MOD = (int)1E9 + 7;
    public static void main(String[] args) {
        int n = ni();
        long[] s = new long[n+1];
        s[0] = 1;
        s[1] = 1;
        for (int i = 2; i <= n; i++) {
            s[i] = s[i-1] + s[i-2];
            s[i] %= MOD;
        }
        
        int m = ni();
        if (m == 0) {
            so.println(s[n]);
            return;
        }
        
        int[] a = new int[m + 2];
        for (int i = 1; i <= m; i++) {
            a[i] = ni();
        }
        a[m+1] = n+1;
        long ans = s[a[1]-1];
        
        for (int i = 2; i <= m+1; i++) {
            int diff = a[i] - a[i-1] - 2;
            if (diff < 0) {
                so.println(0);
                return;
            }
            
            ans *= s[diff];
            ans %= MOD;
        }
        so.println(ans);
    }
    
    
    static int gcd(int m, int n) {
        if(m < n) return gcd(n, m);
        if(n == 0) return m;
        return gcd(n, m % n);
    }
    
    static long lcm(int m, int n) {
        return (long) m * n / gcd(m, n);
    }

    private static long nl() {
        return sc.nextLong();
    }

    private static int ni() {
        return sc.nextInt();
    }

    private static String ns() {
        return sc.next();
    }

    private static char[] nsToChars() {
        return sc.next().toCharArray();
    }

    private static long[] nlongs(int n) {
        return nlongs(n, 0);
    }
    private static int[] nints(int n) {
        return nints(n, 0);
    }

    private static long[] nlongs(int n, int offset) {
        long[] a = new long[offset + n];
        for (int i = 0; i < n; i++)
            a[offset + i] = nl();
        return a;
    }

    private static int[] nints(int n, int offset) {
        int[] a = new int[offset + n];
        for (int i = 0; i < n; i++)
            a[offset + i] = ni();
        return a;
    }
} Main static final Scanner     sc = new Scanner(System.in); sc new Scanner(System.in) static final PrintStream so = System.out; so System.out System System.out static int MOD = (int)1E9 + 7; MOD (int)1E9 + 7 (int)1E9 7 public static void main(String[] args) {
        int n = ni();
        long[] s = new long[n+1];
        s[0] = 1;
        s[1] = 1;
        for (int i = 2; i <= n; i++) {
            s[i] = s[i-1] + s[i-2];
            s[i] %= MOD;
        }
        
        int m = ni();
        if (m == 0) {
            so.println(s[n]);
            return;
        }
        
        int[] a = new int[m + 2];
        for (int i = 1; i <= m; i++) {
            a[i] = ni();
        }
        a[m+1] = n+1;
        long ans = s[a[1]-1];
        
        for (int i = 2; i <= m+1; i++) {
            int diff = a[i] - a[i-1] - 2;
            if (diff < 0) {
                so.println(0);
                return;
            }
            
            ans *= s[diff];
            ans %= MOD;
        }
        so.println(ans);
    } main {
        int n = ni();
        long[] s = new long[n+1];
        s[0] = 1;
        s[1] = 1;
        for (int i = 2; i <= n; i++) {
            s[i] = s[i-1] + s[i-2];
            s[i] %= MOD;
        }
        
        int m = ni();
        if (m == 0) {
            so.println(s[n]);
            return;
        }
        
        int[] a = new int[m + 2];
        for (int i = 1; i <= m; i++) {
            a[i] = ni();
        }
        a[m+1] = n+1;
        long ans = s[a[1]-1];
        
        for (int i = 2; i <= m+1; i++) {
            int diff = a[i] - a[i-1] - 2;
            if (diff < 0) {
                so.println(0);
                return;
            }
            
            ans *= s[diff];
            ans %= MOD;
        }
        so.println(ans);
    } int n = ni(); n ni() ni long[] s = new long[n+1]; s new long[n+1] n+1 n 1 s[0] = 1 s[0] s 0 1 s[1] = 1 s[1] s 1 1 for (int i = 2; i <= n; i++) {
            s[i] = s[i-1] + s[i-2];
            s[i] %= MOD;
        } int i = 2; int i = 2; i 2 i <= n i n i++ i++ i {
            s[i] = s[i-1] + s[i-2];
            s[i] %= MOD;
        } {
            s[i] = s[i-1] + s[i-2];
            s[i] %= MOD;
        } s[i] = s[i-1] + s[i-2] s[i] s i s[i-1] + s[i-2] s[i-1] s i-1 i 1 s[i-2] s i-2 i 2 s[i] %= MOD s[i] s i MOD int m = ni(); m ni() ni if (m == 0) {
            so.println(s[n]);
            return;
        } m == 0 m 0 {
            so.println(s[n]);
            return;
        } so.println(s[n]) so.println so s[n] s n return; int[] a = new int[m + 2]; a new int[m + 2] m + 2 m 2 for (int i = 1; i <= m; i++) {
            a[i] = ni();
        } int i = 1; int i = 1; i 1 i <= m i m i++ i++ i {
            a[i] = ni();
        } {
            a[i] = ni();
        } a[i] = ni() a[i] a i ni() ni a[m+1] = n+1 a[m+1] a m+1 m 1 n+1 n 1 long ans = s[a[1]-1]; ans s[a[1]-1] s a[1]-1 a[1] a 1 1 for (int i = 2; i <= m+1; i++) {
            int diff = a[i] - a[i-1] - 2;
            if (diff < 0) {
                so.println(0);
                return;
            }
            
            ans *= s[diff];
            ans %= MOD;
        } int i = 2; int i = 2; i 2 i <= m+1 i m+1 m 1 i++ i++ i {
            int diff = a[i] - a[i-1] - 2;
            if (diff < 0) {
                so.println(0);
                return;
            }
            
            ans *= s[diff];
            ans %= MOD;
        } {
            int diff = a[i] - a[i-1] - 2;
            if (diff < 0) {
                so.println(0);
                return;
            }
            
            ans *= s[diff];
            ans %= MOD;
        } int diff = a[i] - a[i-1] - 2; diff a[i] - a[i-1] - 2 a[i] - a[i-1] - 2 a[i] a i a[i-1] a i-1 i 1 2 if (diff < 0) {
                so.println(0);
                return;
            } diff < 0 diff 0 {
                so.println(0);
                return;
            } so.println(0) so.println so 0 return; ans *= s[diff] ans s[diff] s diff ans %= MOD ans MOD so.println(ans) so.println so ans String[] args args static int gcd(int m, int n) {
        if(m < n) return gcd(n, m);
        if(n == 0) return m;
        return gcd(n, m % n);
    } gcd {
        if(m < n) return gcd(n, m);
        if(n == 0) return m;
        return gcd(n, m % n);
    } if(m < n) return gcd(n, m); m < n m n return gcd(n, m); gcd(n, m) gcd n m if(n == 0) return m; n == 0 n 0 return m; m return gcd(n, m % n); gcd(n, m % n) gcd n m % n m n int m m int n n static long lcm(int m, int n) {
        return (long) m * n / gcd(m, n);
    } lcm {
        return (long) m * n / gcd(m, n);
    } return (long) m * n / gcd(m, n); (long) m * n / gcd(m, n) (long) m * n (long) m n gcd(m, n) gcd m n int m m int n n private static long nl() {
        return sc.nextLong();
    } nl {
        return sc.nextLong();
    } return sc.nextLong(); sc.nextLong() sc.nextLong sc private static int ni() {
        return sc.nextInt();
    } ni {
        return sc.nextInt();
    } return sc.nextInt(); sc.nextInt() sc.nextInt sc private static String ns() {
        return sc.next();
    } ns {
        return sc.next();
    } return sc.next(); sc.next() sc.next sc private static char[] nsToChars() {
        return sc.next().toCharArray();
    } nsToChars {
        return sc.next().toCharArray();
    } return sc.next().toCharArray(); sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc private static long[] nlongs(int n) {
        return nlongs(n, 0);
    } nlongs {
        return nlongs(n, 0);
    } return nlongs(n, 0); nlongs(n, 0) nlongs n 0 int n n private static int[] nints(int n) {
        return nints(n, 0);
    } nints {
        return nints(n, 0);
    } return nints(n, 0); nints(n, 0) nints n 0 int n n private static long[] nlongs(int n, int offset) {
        long[] a = new long[offset + n];
        for (int i = 0; i < n; i++)
            a[offset + i] = nl();
        return a;
    } nlongs {
        long[] a = new long[offset + n];
        for (int i = 0; i < n; i++)
            a[offset + i] = nl();
        return a;
    } long[] a = new long[offset + n]; a new long[offset + n] offset + n offset n for (int i = 0; i < n; i++)
            a[offset + i] = nl(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[offset + i] = nl(); a[offset + i] = nl() a[offset + i] a offset + i offset i nl() nl return a; a int n n int offset offset private static int[] nints(int n, int offset) {
        int[] a = new int[offset + n];
        for (int i = 0; i < n; i++)
            a[offset + i] = ni();
        return a;
    } nints {
        int[] a = new int[offset + n];
        for (int i = 0; i < n; i++)
            a[offset + i] = ni();
        return a;
    } int[] a = new int[offset + n]; a new int[offset + n] offset + n offset n for (int i = 0; i < n; i++)
            a[offset + i] = ni(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[offset + i] = ni(); a[offset + i] = ni() a[offset + i] a offset + i offset i ni() ni return a; a int n n int offset offset public class Main {
    static final Scanner     sc = new Scanner(System.in);
    static final PrintStream so = System.out;
    static int MOD = (int)1E9 + 7;
    public static void main(String[] args) {
        int n = ni();
        long[] s = new long[n+1];
        s[0] = 1;
        s[1] = 1;
        for (int i = 2; i <= n; i++) {
            s[i] = s[i-1] + s[i-2];
            s[i] %= MOD;
        }
        
        int m = ni();
        if (m == 0) {
            so.println(s[n]);
            return;
        }
        
        int[] a = new int[m + 2];
        for (int i = 1; i <= m; i++) {
            a[i] = ni();
        }
        a[m+1] = n+1;
        long ans = s[a[1]-1];
        
        for (int i = 2; i <= m+1; i++) {
            int diff = a[i] - a[i-1] - 2;
            if (diff < 0) {
                so.println(0);
                return;
            }
            
            ans *= s[diff];
            ans %= MOD;
        }
        so.println(ans);
    }
    
    
    static int gcd(int m, int n) {
        if(m < n) return gcd(n, m);
        if(n == 0) return m;
        return gcd(n, m % n);
    }
    
    static long lcm(int m, int n) {
        return (long) m * n / gcd(m, n);
    }

    private static long nl() {
        return sc.nextLong();
    }

    private static int ni() {
        return sc.nextInt();
    }

    private static String ns() {
        return sc.next();
    }

    private static char[] nsToChars() {
        return sc.next().toCharArray();
    }

    private static long[] nlongs(int n) {
        return nlongs(n, 0);
    }
    private static int[] nints(int n) {
        return nints(n, 0);
    }

    private static long[] nlongs(int n, int offset) {
        long[] a = new long[offset + n];
        for (int i = 0; i < n; i++)
            a[offset + i] = nl();
        return a;
    }

    private static int[] nints(int n, int offset) {
        int[] a = new int[offset + n];
        for (int i = 0; i < n; i++)
            a[offset + i] = ni();
        return a;
    }
} public class Main {
    static final Scanner     sc = new Scanner(System.in);
    static final PrintStream so = System.out;
    static int MOD = (int)1E9 + 7;
    public static void main(String[] args) {
        int n = ni();
        long[] s = new long[n+1];
        s[0] = 1;
        s[1] = 1;
        for (int i = 2; i <= n; i++) {
            s[i] = s[i-1] + s[i-2];
            s[i] %= MOD;
        }
        
        int m = ni();
        if (m == 0) {
            so.println(s[n]);
            return;
        }
        
        int[] a = new int[m + 2];
        for (int i = 1; i <= m; i++) {
            a[i] = ni();
        }
        a[m+1] = n+1;
        long ans = s[a[1]-1];
        
        for (int i = 2; i <= m+1; i++) {
            int diff = a[i] - a[i-1] - 2;
            if (diff < 0) {
                so.println(0);
                return;
            }
            
            ans *= s[diff];
            ans %= MOD;
        }
        so.println(ans);
    }
    
    
    static int gcd(int m, int n) {
        if(m < n) return gcd(n, m);
        if(n == 0) return m;
        return gcd(n, m % n);
    }
    
    static long lcm(int m, int n) {
        return (long) m * n / gcd(m, n);
    }

    private static long nl() {
        return sc.nextLong();
    }

    private static int ni() {
        return sc.nextInt();
    }

    private static String ns() {
        return sc.next();
    }

    private static char[] nsToChars() {
        return sc.next().toCharArray();
    }

    private static long[] nlongs(int n) {
        return nlongs(n, 0);
    }
    private static int[] nints(int n) {
        return nints(n, 0);
    }

    private static long[] nlongs(int n, int offset) {
        long[] a = new long[offset + n];
        for (int i = 0; i < n; i++)
            a[offset + i] = nl();
        return a;
    }

    private static int[] nints(int n, int offset) {
        int[] a = new int[offset + n];
        for (int i = 0; i < n; i++)
            a[offset + i] = ni();
        return a;
    }
} Main
import java.io.PrintStream;
import java.util.Scanner;

public class Main {
    static final Scanner     sc = new Scanner(System.in);
    static final PrintStream so = System.out;
    static int MOD = (int)1E9 + 7;
    public static void main(String[] args) {
        int n = ni();
        long[] s = new long[n+1];
        s[0] = 1;
        s[1] = 1;
        for (int i = 2; i <= n; i++) {
            s[i] = s[i-1] + s[i-2];
            s[i] %= MOD;
        }
        
        int m = ni();
        if (m == 0) {
            so.println(s[n]);
            return;
        }
        
        int[] a = new int[m + 2];
        for (int i = 1; i <= m; i++) {
            a[i] = ni();
        }
        a[m+1] = n+1;
        long ans = s[a[1]-1];
        
        for (int i = 2; i <= m+1; i++) {
            int diff = a[i] - a[i-1] - 2;
            if (diff < 0) {
                so.println(0);
                return;
            }
            
            ans *= s[diff];
            ans %= MOD;
        }
        so.println(ans);
    }
    
    
    static int gcd(int m, int n) {
        if(m < n) return gcd(n, m);
        if(n == 0) return m;
        return gcd(n, m % n);
    }
    
    static long lcm(int m, int n) {
        return (long) m * n / gcd(m, n);
    }

    private static long nl() {
        return sc.nextLong();
    }

    private static int ni() {
        return sc.nextInt();
    }

    private static String ns() {
        return sc.next();
    }

    private static char[] nsToChars() {
        return sc.next().toCharArray();
    }

    private static long[] nlongs(int n) {
        return nlongs(n, 0);
    }
    private static int[] nints(int n) {
        return nints(n, 0);
    }

    private static long[] nlongs(int n, int offset) {
        long[] a = new long[offset + n];
        for (int i = 0; i < n; i++)
            a[offset + i] = nl();
        return a;
    }

    private static int[] nints(int n, int offset) {
        int[] a = new int[offset + n];
        for (int i = 0; i < n; i++)
            a[offset + i] = ni();
        return a;
    }
}
