import java.io.*;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws IOException {
        init();

        int N = nextInt(), M = nextInt();
        Set<Integer> vals = new HashSet<>();
        for (int i = 0; i < M; i++) vals.add(nextInt());

        long mod = 1000000007;
        long[] ways = new long[N + 1];

        ways[0] = 1;

        for (int i = 1; i < ways.length; i++) {
            if (vals.contains(i)) ways[i] = 0;
            else ways[i] = (ways[i - 1] + (i - 2 >= 0 ? ways[i - 2] : 0)) % mod;
        }

        System.out.println(ways[N]);
    }

    //Input Reader
    private static BufferedReader reader;
    private static StringTokenizer tokenizer;

    private static void init() {
        reader = new BufferedReader(new InputStreamReader(System.in));
        tokenizer = new StringTokenizer("");
    }

    private static String next() throws IOException {
        String read;
        while (!tokenizer.hasMoreTokens()) {
            read = reader.readLine();
            if (read == null || read.equals(""))
                return "-1";
            tokenizer = new StringTokenizer(read);
        }

        return tokenizer.nextToken();
    }

    private static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }
} import java.io.*; io.* java import java.util.HashSet; HashSet java.util import java.util.Set; Set java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main {

    public static void main(String[] args) throws IOException {
        init();

        int N = nextInt(), M = nextInt();
        Set<Integer> vals = new HashSet<>();
        for (int i = 0; i < M; i++) vals.add(nextInt());

        long mod = 1000000007;
        long[] ways = new long[N + 1];

        ways[0] = 1;

        for (int i = 1; i < ways.length; i++) {
            if (vals.contains(i)) ways[i] = 0;
            else ways[i] = (ways[i - 1] + (i - 2 >= 0 ? ways[i - 2] : 0)) % mod;
        }

        System.out.println(ways[N]);
    }

    //Input Reader
    private static BufferedReader reader;
    private static StringTokenizer tokenizer;

    private static void init() {
        reader = new BufferedReader(new InputStreamReader(System.in));
        tokenizer = new StringTokenizer("");
    }

    private static String next() throws IOException {
        String read;
        while (!tokenizer.hasMoreTokens()) {
            read = reader.readLine();
            if (read == null || read.equals(""))
                return "-1";
            tokenizer = new StringTokenizer(read);
        }

        return tokenizer.nextToken();
    }

    private static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }
} Main //Input Reader
    private static BufferedReader reader; reader private static StringTokenizer tokenizer; tokenizer public static void main(String[] args) throws IOException {
        init();

        int N = nextInt(), M = nextInt();
        Set<Integer> vals = new HashSet<>();
        for (int i = 0; i < M; i++) vals.add(nextInt());

        long mod = 1000000007;
        long[] ways = new long[N + 1];

        ways[0] = 1;

        for (int i = 1; i < ways.length; i++) {
            if (vals.contains(i)) ways[i] = 0;
            else ways[i] = (ways[i - 1] + (i - 2 >= 0 ? ways[i - 2] : 0)) % mod;
        }

        System.out.println(ways[N]);
    } main {
        init();

        int N = nextInt(), M = nextInt();
        Set<Integer> vals = new HashSet<>();
        for (int i = 0; i < M; i++) vals.add(nextInt());

        long mod = 1000000007;
        long[] ways = new long[N + 1];

        ways[0] = 1;

        for (int i = 1; i < ways.length; i++) {
            if (vals.contains(i)) ways[i] = 0;
            else ways[i] = (ways[i - 1] + (i - 2 >= 0 ? ways[i - 2] : 0)) % mod;
        }

        System.out.println(ways[N]);
    } init() init int N = nextInt() N nextInt() nextInt M = nextInt(); M nextInt() nextInt Set<Integer> vals = new HashSet<>(); vals new HashSet<>() for (int i = 0; i < M; i++) vals.add(nextInt()); int i = 0; int i = 0; i 0 i < M i M i++ i++ i vals.add(nextInt()); vals.add(nextInt()) vals.add vals nextInt() nextInt long mod = 1000000007; mod 1000000007 long[] ways = new long[N + 1]; ways new long[N + 1] N + 1 N 1 ways[0] = 1 ways[0] ways 0 1 for (int i = 1; i < ways.length; i++) {
            if (vals.contains(i)) ways[i] = 0;
            else ways[i] = (ways[i - 1] + (i - 2 >= 0 ? ways[i - 2] : 0)) % mod;
        } int i = 1; int i = 1; i 1 i < ways.length i ways.length ways ways.length i++ i++ i {
            if (vals.contains(i)) ways[i] = 0;
            else ways[i] = (ways[i - 1] + (i - 2 >= 0 ? ways[i - 2] : 0)) % mod;
        } {
            if (vals.contains(i)) ways[i] = 0;
            else ways[i] = (ways[i - 1] + (i - 2 >= 0 ? ways[i - 2] : 0)) % mod;
        } if (vals.contains(i)) ways[i] = 0;
            else ways[i] = (ways[i - 1] + (i - 2 >= 0 ? ways[i - 2] : 0)) % mod; vals.contains(i) vals.contains vals i ways[i] = 0 ways[i] ways i 0 ways[i] = (ways[i - 1] + (i - 2 >= 0 ? ways[i - 2] : 0)) % mod ways[i] ways i (ways[i - 1] + (i - 2 >= 0 ? ways[i - 2] : 0)) % mod (ways[i - 1] + (i - 2 >= 0 ? ways[i - 2] : 0)) ways[i - 1] ways i - 1 i 1 (i - 2 >= 0 ? ways[i - 2] : 0) i - 2 >= 0 i - 2 i 2 0 ways[i - 2] ways i - 2 i 2 0 mod System.out.println(ways[N]) System.out.println System.out System System.out ways[N] ways N String[] args args private static void init() {
        reader = new BufferedReader(new InputStreamReader(System.in));
        tokenizer = new StringTokenizer("");
    } init {
        reader = new BufferedReader(new InputStreamReader(System.in));
        tokenizer = new StringTokenizer("");
    } reader = new BufferedReader(new InputStreamReader(System.in)) reader new BufferedReader(new InputStreamReader(System.in)) tokenizer = new StringTokenizer("") tokenizer new StringTokenizer("") private static String next() throws IOException {
        String read;
        while (!tokenizer.hasMoreTokens()) {
            read = reader.readLine();
            if (read == null || read.equals(""))
                return "-1";
            tokenizer = new StringTokenizer(read);
        }

        return tokenizer.nextToken();
    } next {
        String read;
        while (!tokenizer.hasMoreTokens()) {
            read = reader.readLine();
            if (read == null || read.equals(""))
                return "-1";
            tokenizer = new StringTokenizer(read);
        }

        return tokenizer.nextToken();
    } String read; read while (!tokenizer.hasMoreTokens()) {
            read = reader.readLine();
            if (read == null || read.equals(""))
                return "-1";
            tokenizer = new StringTokenizer(read);
        } !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
            read = reader.readLine();
            if (read == null || read.equals(""))
                return "-1";
            tokenizer = new StringTokenizer(read);
        } read = reader.readLine() read reader.readLine() reader.readLine reader if (read == null || read.equals(""))
                return "-1"; read == null || read.equals("") read == null read null read.equals("") read.equals read "" return "-1"; "-1" tokenizer = new StringTokenizer(read) tokenizer new StringTokenizer(read) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer private static int nextInt() throws IOException {
        return Integer.parseInt(next());
    } nextInt {
        return Integer.parseInt(next());
    } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public class Main {

    public static void main(String[] args) throws IOException {
        init();

        int N = nextInt(), M = nextInt();
        Set<Integer> vals = new HashSet<>();
        for (int i = 0; i < M; i++) vals.add(nextInt());

        long mod = 1000000007;
        long[] ways = new long[N + 1];

        ways[0] = 1;

        for (int i = 1; i < ways.length; i++) {
            if (vals.contains(i)) ways[i] = 0;
            else ways[i] = (ways[i - 1] + (i - 2 >= 0 ? ways[i - 2] : 0)) % mod;
        }

        System.out.println(ways[N]);
    }

    //Input Reader
    private static BufferedReader reader;
    private static StringTokenizer tokenizer;

    private static void init() {
        reader = new BufferedReader(new InputStreamReader(System.in));
        tokenizer = new StringTokenizer("");
    }

    private static String next() throws IOException {
        String read;
        while (!tokenizer.hasMoreTokens()) {
            read = reader.readLine();
            if (read == null || read.equals(""))
                return "-1";
            tokenizer = new StringTokenizer(read);
        }

        return tokenizer.nextToken();
    }

    private static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }
} public class Main {

    public static void main(String[] args) throws IOException {
        init();

        int N = nextInt(), M = nextInt();
        Set<Integer> vals = new HashSet<>();
        for (int i = 0; i < M; i++) vals.add(nextInt());

        long mod = 1000000007;
        long[] ways = new long[N + 1];

        ways[0] = 1;

        for (int i = 1; i < ways.length; i++) {
            if (vals.contains(i)) ways[i] = 0;
            else ways[i] = (ways[i - 1] + (i - 2 >= 0 ? ways[i - 2] : 0)) % mod;
        }

        System.out.println(ways[N]);
    }

    //Input Reader
    private static BufferedReader reader;
    private static StringTokenizer tokenizer;

    private static void init() {
        reader = new BufferedReader(new InputStreamReader(System.in));
        tokenizer = new StringTokenizer("");
    }

    private static String next() throws IOException {
        String read;
        while (!tokenizer.hasMoreTokens()) {
            read = reader.readLine();
            if (read == null || read.equals(""))
                return "-1";
            tokenizer = new StringTokenizer(read);
        }

        return tokenizer.nextToken();
    }

    private static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }
} Main
import java.io.*;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws IOException {
        init();

        int N = nextInt(), M = nextInt();
        Set<Integer> vals = new HashSet<>();
        for (int i = 0; i < M; i++) vals.add(nextInt());

        long mod = 1000000007;
        long[] ways = new long[N + 1];

        ways[0] = 1;

        for (int i = 1; i < ways.length; i++) {
            if (vals.contains(i)) ways[i] = 0;
            else ways[i] = (ways[i - 1] + (i - 2 >= 0 ? ways[i - 2] : 0)) % mod;
        }

        System.out.println(ways[N]);
    }

    //Input Reader
    private static BufferedReader reader;
    private static StringTokenizer tokenizer;

    private static void init() {
        reader = new BufferedReader(new InputStreamReader(System.in));
        tokenizer = new StringTokenizer("");
    }

    private static String next() throws IOException {
        String read;
        while (!tokenizer.hasMoreTokens()) {
            read = reader.readLine();
            if (read == null || read.equals(""))
                return "-1";
            tokenizer = new StringTokenizer(read);
        }

        return tokenizer.nextToken();
    }

    private static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }
}