
import java.util.Scanner;
import java.math.BigInteger;

public class Main {
	static int[] breaks;
	static int num;
	static BigInteger[] patterns;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		num = sc.nextInt();
		int m = sc.nextInt();
		breaks = new int[m];
		patterns = new BigInteger[num + 3];
		for(int i = 0; i < m; i++){
			breaks[i] = sc.nextInt();
		}
		BigInteger devider = new BigInteger("1000000007");
		System.out.println(pattern(0).remainder(devider).longValue());
	}
	static BigInteger pattern(int p){
		if(patterns[p] != null){
			return patterns[p];
		}
		if(p == num){
			patterns[p] = BigInteger.ONE;
			return patterns[p];
		}
		if(p > num){
			patterns[p] = BigInteger.ZERO;
			return patterns[p];
		}
		for(int i = 0; i < breaks.length; i++){
			if(p == breaks[i]){
				patterns[p] = BigInteger.ZERO;
				return patterns[p];
			}
		}
		patterns[p] = pattern(p + 1).add(pattern(p + 2));
		return patterns[p];
	}
} import java.util.Scanner; Scanner java.util import java.math.BigInteger; BigInteger java.math public class Main {
	static int[] breaks;
	static int num;
	static BigInteger[] patterns;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		num = sc.nextInt();
		int m = sc.nextInt();
		breaks = new int[m];
		patterns = new BigInteger[num + 3];
		for(int i = 0; i < m; i++){
			breaks[i] = sc.nextInt();
		}
		BigInteger devider = new BigInteger("1000000007");
		System.out.println(pattern(0).remainder(devider).longValue());
	}
	static BigInteger pattern(int p){
		if(patterns[p] != null){
			return patterns[p];
		}
		if(p == num){
			patterns[p] = BigInteger.ONE;
			return patterns[p];
		}
		if(p > num){
			patterns[p] = BigInteger.ZERO;
			return patterns[p];
		}
		for(int i = 0; i < breaks.length; i++){
			if(p == breaks[i]){
				patterns[p] = BigInteger.ZERO;
				return patterns[p];
			}
		}
		patterns[p] = pattern(p + 1).add(pattern(p + 2));
		return patterns[p];
	}
} Main static int[] breaks; breaks static int num; num static BigInteger[] patterns; patterns public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		num = sc.nextInt();
		int m = sc.nextInt();
		breaks = new int[m];
		patterns = new BigInteger[num + 3];
		for(int i = 0; i < m; i++){
			breaks[i] = sc.nextInt();
		}
		BigInteger devider = new BigInteger("1000000007");
		System.out.println(pattern(0).remainder(devider).longValue());
	} main {
		Scanner sc = new Scanner(System.in);
		num = sc.nextInt();
		int m = sc.nextInt();
		breaks = new int[m];
		patterns = new BigInteger[num + 3];
		for(int i = 0; i < m; i++){
			breaks[i] = sc.nextInt();
		}
		BigInteger devider = new BigInteger("1000000007");
		System.out.println(pattern(0).remainder(devider).longValue());
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) num = sc.nextInt() num sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc breaks = new int[m] breaks new int[m] m patterns = new BigInteger[num + 3] patterns new BigInteger[num + 3] num + 3 num 3 for(int i = 0; i < m; i++){
			breaks[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			breaks[i] = sc.nextInt();
		} {
			breaks[i] = sc.nextInt();
		} breaks[i] = sc.nextInt() breaks[i] breaks i sc.nextInt() sc.nextInt sc BigInteger devider = new BigInteger("1000000007"); devider new BigInteger("1000000007") System.out.println(pattern(0).remainder(devider).longValue()) System.out.println System.out System System.out pattern(0).remainder(devider).longValue() pattern(0).remainder(devider).longValue pattern(0).remainder(devider) pattern(0).remainder pattern(0) pattern 0 devider String[] args args static BigInteger pattern(int p){
		if(patterns[p] != null){
			return patterns[p];
		}
		if(p == num){
			patterns[p] = BigInteger.ONE;
			return patterns[p];
		}
		if(p > num){
			patterns[p] = BigInteger.ZERO;
			return patterns[p];
		}
		for(int i = 0; i < breaks.length; i++){
			if(p == breaks[i]){
				patterns[p] = BigInteger.ZERO;
				return patterns[p];
			}
		}
		patterns[p] = pattern(p + 1).add(pattern(p + 2));
		return patterns[p];
	} pattern {
		if(patterns[p] != null){
			return patterns[p];
		}
		if(p == num){
			patterns[p] = BigInteger.ONE;
			return patterns[p];
		}
		if(p > num){
			patterns[p] = BigInteger.ZERO;
			return patterns[p];
		}
		for(int i = 0; i < breaks.length; i++){
			if(p == breaks[i]){
				patterns[p] = BigInteger.ZERO;
				return patterns[p];
			}
		}
		patterns[p] = pattern(p + 1).add(pattern(p + 2));
		return patterns[p];
	} if(patterns[p] != null){
			return patterns[p];
		} patterns[p] != null patterns[p] patterns p null {
			return patterns[p];
		} return patterns[p]; patterns[p] patterns p if(p == num){
			patterns[p] = BigInteger.ONE;
			return patterns[p];
		} p == num p num {
			patterns[p] = BigInteger.ONE;
			return patterns[p];
		} patterns[p] = BigInteger.ONE patterns[p] patterns p BigInteger.ONE BigInteger BigInteger.ONE return patterns[p]; patterns[p] patterns p if(p > num){
			patterns[p] = BigInteger.ZERO;
			return patterns[p];
		} p > num p num {
			patterns[p] = BigInteger.ZERO;
			return patterns[p];
		} patterns[p] = BigInteger.ZERO patterns[p] patterns p BigInteger.ZERO BigInteger BigInteger.ZERO return patterns[p]; patterns[p] patterns p for(int i = 0; i < breaks.length; i++){
			if(p == breaks[i]){
				patterns[p] = BigInteger.ZERO;
				return patterns[p];
			}
		} int i = 0; int i = 0; i 0 i < breaks.length i breaks.length breaks breaks.length i++ i++ i {
			if(p == breaks[i]){
				patterns[p] = BigInteger.ZERO;
				return patterns[p];
			}
		} {
			if(p == breaks[i]){
				patterns[p] = BigInteger.ZERO;
				return patterns[p];
			}
		} if(p == breaks[i]){
				patterns[p] = BigInteger.ZERO;
				return patterns[p];
			} p == breaks[i] p breaks[i] breaks i {
				patterns[p] = BigInteger.ZERO;
				return patterns[p];
			} patterns[p] = BigInteger.ZERO patterns[p] patterns p BigInteger.ZERO BigInteger BigInteger.ZERO return patterns[p]; patterns[p] patterns p patterns[p] = pattern(p + 1).add(pattern(p + 2)) patterns[p] patterns p pattern(p + 1).add(pattern(p + 2)) pattern(p + 1).add pattern(p + 1) pattern p + 1 p 1 pattern(p + 2) pattern p + 2 p 2 return patterns[p]; patterns[p] patterns p int p p public class Main {
	static int[] breaks;
	static int num;
	static BigInteger[] patterns;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		num = sc.nextInt();
		int m = sc.nextInt();
		breaks = new int[m];
		patterns = new BigInteger[num + 3];
		for(int i = 0; i < m; i++){
			breaks[i] = sc.nextInt();
		}
		BigInteger devider = new BigInteger("1000000007");
		System.out.println(pattern(0).remainder(devider).longValue());
	}
	static BigInteger pattern(int p){
		if(patterns[p] != null){
			return patterns[p];
		}
		if(p == num){
			patterns[p] = BigInteger.ONE;
			return patterns[p];
		}
		if(p > num){
			patterns[p] = BigInteger.ZERO;
			return patterns[p];
		}
		for(int i = 0; i < breaks.length; i++){
			if(p == breaks[i]){
				patterns[p] = BigInteger.ZERO;
				return patterns[p];
			}
		}
		patterns[p] = pattern(p + 1).add(pattern(p + 2));
		return patterns[p];
	}
} public class Main {
	static int[] breaks;
	static int num;
	static BigInteger[] patterns;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		num = sc.nextInt();
		int m = sc.nextInt();
		breaks = new int[m];
		patterns = new BigInteger[num + 3];
		for(int i = 0; i < m; i++){
			breaks[i] = sc.nextInt();
		}
		BigInteger devider = new BigInteger("1000000007");
		System.out.println(pattern(0).remainder(devider).longValue());
	}
	static BigInteger pattern(int p){
		if(patterns[p] != null){
			return patterns[p];
		}
		if(p == num){
			patterns[p] = BigInteger.ONE;
			return patterns[p];
		}
		if(p > num){
			patterns[p] = BigInteger.ZERO;
			return patterns[p];
		}
		for(int i = 0; i < breaks.length; i++){
			if(p == breaks[i]){
				patterns[p] = BigInteger.ZERO;
				return patterns[p];
			}
		}
		patterns[p] = pattern(p + 1).add(pattern(p + 2));
		return patterns[p];
	}
} Main

import java.util.Scanner;
import java.math.BigInteger;

public class Main {
	static int[] breaks;
	static int num;
	static BigInteger[] patterns;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		num = sc.nextInt();
		int m = sc.nextInt();
		breaks = new int[m];
		patterns = new BigInteger[num + 3];
		for(int i = 0; i < m; i++){
			breaks[i] = sc.nextInt();
		}
		BigInteger devider = new BigInteger("1000000007");
		System.out.println(pattern(0).remainder(devider).longValue());
	}
	static BigInteger pattern(int p){
		if(patterns[p] != null){
			return patterns[p];
		}
		if(p == num){
			patterns[p] = BigInteger.ONE;
			return patterns[p];
		}
		if(p > num){
			patterns[p] = BigInteger.ZERO;
			return patterns[p];
		}
		for(int i = 0; i < breaks.length; i++){
			if(p == breaks[i]){
				patterns[p] = BigInteger.ZERO;
				return patterns[p];
			}
		}
		patterns[p] = pattern(p + 1).add(pattern(p + 2));
		return patterns[p];
	}
}
