import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
	static int m;
	static int n;
	static int [] map;
	static List<Integer> list;
	static boolean [] stepExistence;
	public static void main(String[]args){
		Scanner scan = new Scanner (System.in);
		n = scan.nextInt();
		m = scan.nextInt();
		map = new int [n+1];
		list = new ArrayList<Integer>();
		stepExistence = new boolean[n+1];
		for(int i = 0;i < n+1;i++) {
			map[i] = -1;
			stepExistence[i] = true;
		}
		for(int i = 0; i < m;i++) {
			list.add(scan.nextInt());
			stepExistence[list.get(i)] = false;
		}
		map[0] = 1;
		map[1] = 1;
		int ans = downSteps(n);
		System.out.println(ans%1000000007);
	}
	public static int downSteps (int Step) {
		if(map[Step] > -1) {
			return map[Step];
		}
		int nextStep = Step-1;
		int twoDownStep = Step-2;
		int pattern = 0;
		if(stepExistence[nextStep]) {
			pattern = downSteps(nextStep);
			if(stepExistence[twoDownStep]) {
				pattern += downSteps(twoDownStep);
			}
		}else if(stepExistence[twoDownStep]) {
			pattern = downSteps(twoDownStep);
		}
		pattern = pattern % 1000000007;
		map[Step] = pattern;
		return pattern;
	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	static int m;
	static int n;
	static int [] map;
	static List<Integer> list;
	static boolean [] stepExistence;
	public static void main(String[]args){
		Scanner scan = new Scanner (System.in);
		n = scan.nextInt();
		m = scan.nextInt();
		map = new int [n+1];
		list = new ArrayList<Integer>();
		stepExistence = new boolean[n+1];
		for(int i = 0;i < n+1;i++) {
			map[i] = -1;
			stepExistence[i] = true;
		}
		for(int i = 0; i < m;i++) {
			list.add(scan.nextInt());
			stepExistence[list.get(i)] = false;
		}
		map[0] = 1;
		map[1] = 1;
		int ans = downSteps(n);
		System.out.println(ans%1000000007);
	}
	public static int downSteps (int Step) {
		if(map[Step] > -1) {
			return map[Step];
		}
		int nextStep = Step-1;
		int twoDownStep = Step-2;
		int pattern = 0;
		if(stepExistence[nextStep]) {
			pattern = downSteps(nextStep);
			if(stepExistence[twoDownStep]) {
				pattern += downSteps(twoDownStep);
			}
		}else if(stepExistence[twoDownStep]) {
			pattern = downSteps(twoDownStep);
		}
		pattern = pattern % 1000000007;
		map[Step] = pattern;
		return pattern;
	}
} Main static int m; m static int n; n static int [] map; map static List<Integer> list; list static boolean [] stepExistence; stepExistence public static void main(String[]args){
		Scanner scan = new Scanner (System.in);
		n = scan.nextInt();
		m = scan.nextInt();
		map = new int [n+1];
		list = new ArrayList<Integer>();
		stepExistence = new boolean[n+1];
		for(int i = 0;i < n+1;i++) {
			map[i] = -1;
			stepExistence[i] = true;
		}
		for(int i = 0; i < m;i++) {
			list.add(scan.nextInt());
			stepExistence[list.get(i)] = false;
		}
		map[0] = 1;
		map[1] = 1;
		int ans = downSteps(n);
		System.out.println(ans%1000000007);
	} main {
		Scanner scan = new Scanner (System.in);
		n = scan.nextInt();
		m = scan.nextInt();
		map = new int [n+1];
		list = new ArrayList<Integer>();
		stepExistence = new boolean[n+1];
		for(int i = 0;i < n+1;i++) {
			map[i] = -1;
			stepExistence[i] = true;
		}
		for(int i = 0; i < m;i++) {
			list.add(scan.nextInt());
			stepExistence[list.get(i)] = false;
		}
		map[0] = 1;
		map[1] = 1;
		int ans = downSteps(n);
		System.out.println(ans%1000000007);
	} Scanner scan = new Scanner (System.in); scan new Scanner (System.in) n = scan.nextInt() n scan.nextInt() scan.nextInt scan m = scan.nextInt() m scan.nextInt() scan.nextInt scan map = new int [n+1] map new int [n+1] n+1 n 1 list = new ArrayList<Integer>() list new ArrayList<Integer>() stepExistence = new boolean[n+1] stepExistence new boolean[n+1] n+1 n 1 for(int i = 0;i < n+1;i++) {
			map[i] = -1;
			stepExistence[i] = true;
		} int i = 0; int i = 0; i 0 i < n+1 i n+1 n 1 i++ i++ i {
			map[i] = -1;
			stepExistence[i] = true;
		} {
			map[i] = -1;
			stepExistence[i] = true;
		} map[i] = -1 map[i] map i -1 1 stepExistence[i] = true stepExistence[i] stepExistence i true for(int i = 0; i < m;i++) {
			list.add(scan.nextInt());
			stepExistence[list.get(i)] = false;
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			list.add(scan.nextInt());
			stepExistence[list.get(i)] = false;
		} {
			list.add(scan.nextInt());
			stepExistence[list.get(i)] = false;
		} list.add(scan.nextInt()) list.add list scan.nextInt() scan.nextInt scan stepExistence[list.get(i)] = false stepExistence[list.get(i)] stepExistence list.get(i) list.get list i false map[0] = 1 map[0] map 0 1 map[1] = 1 map[1] map 1 1 int ans = downSteps(n); ans downSteps(n) downSteps n System.out.println(ans%1000000007) System.out.println System.out System System.out ans%1000000007 ans 1000000007 String[]args args public static int downSteps (int Step) {
		if(map[Step] > -1) {
			return map[Step];
		}
		int nextStep = Step-1;
		int twoDownStep = Step-2;
		int pattern = 0;
		if(stepExistence[nextStep]) {
			pattern = downSteps(nextStep);
			if(stepExistence[twoDownStep]) {
				pattern += downSteps(twoDownStep);
			}
		}else if(stepExistence[twoDownStep]) {
			pattern = downSteps(twoDownStep);
		}
		pattern = pattern % 1000000007;
		map[Step] = pattern;
		return pattern;
	} downSteps {
		if(map[Step] > -1) {
			return map[Step];
		}
		int nextStep = Step-1;
		int twoDownStep = Step-2;
		int pattern = 0;
		if(stepExistence[nextStep]) {
			pattern = downSteps(nextStep);
			if(stepExistence[twoDownStep]) {
				pattern += downSteps(twoDownStep);
			}
		}else if(stepExistence[twoDownStep]) {
			pattern = downSteps(twoDownStep);
		}
		pattern = pattern % 1000000007;
		map[Step] = pattern;
		return pattern;
	} if(map[Step] > -1) {
			return map[Step];
		} map[Step] > -1 map[Step] map Step -1 1 {
			return map[Step];
		} return map[Step]; map[Step] map Step int nextStep = Step-1; nextStep Step-1 Step 1 int twoDownStep = Step-2; twoDownStep Step-2 Step 2 int pattern = 0; pattern 0 if(stepExistence[nextStep]) {
			pattern = downSteps(nextStep);
			if(stepExistence[twoDownStep]) {
				pattern += downSteps(twoDownStep);
			}
		}else if(stepExistence[twoDownStep]) {
			pattern = downSteps(twoDownStep);
		} stepExistence[nextStep] stepExistence nextStep {
			pattern = downSteps(nextStep);
			if(stepExistence[twoDownStep]) {
				pattern += downSteps(twoDownStep);
			}
		} pattern = downSteps(nextStep) pattern downSteps(nextStep) downSteps nextStep if(stepExistence[twoDownStep]) {
				pattern += downSteps(twoDownStep);
			} stepExistence[twoDownStep] stepExistence twoDownStep {
				pattern += downSteps(twoDownStep);
			} pattern += downSteps(twoDownStep) pattern downSteps(twoDownStep) downSteps twoDownStep if(stepExistence[twoDownStep]) {
			pattern = downSteps(twoDownStep);
		} stepExistence[twoDownStep] stepExistence twoDownStep {
			pattern = downSteps(twoDownStep);
		} pattern = downSteps(twoDownStep) pattern downSteps(twoDownStep) downSteps twoDownStep pattern = pattern % 1000000007 pattern pattern % 1000000007 pattern 1000000007 map[Step] = pattern map[Step] map Step pattern return pattern; pattern int Step Step public class Main {
	static int m;
	static int n;
	static int [] map;
	static List<Integer> list;
	static boolean [] stepExistence;
	public static void main(String[]args){
		Scanner scan = new Scanner (System.in);
		n = scan.nextInt();
		m = scan.nextInt();
		map = new int [n+1];
		list = new ArrayList<Integer>();
		stepExistence = new boolean[n+1];
		for(int i = 0;i < n+1;i++) {
			map[i] = -1;
			stepExistence[i] = true;
		}
		for(int i = 0; i < m;i++) {
			list.add(scan.nextInt());
			stepExistence[list.get(i)] = false;
		}
		map[0] = 1;
		map[1] = 1;
		int ans = downSteps(n);
		System.out.println(ans%1000000007);
	}
	public static int downSteps (int Step) {
		if(map[Step] > -1) {
			return map[Step];
		}
		int nextStep = Step-1;
		int twoDownStep = Step-2;
		int pattern = 0;
		if(stepExistence[nextStep]) {
			pattern = downSteps(nextStep);
			if(stepExistence[twoDownStep]) {
				pattern += downSteps(twoDownStep);
			}
		}else if(stepExistence[twoDownStep]) {
			pattern = downSteps(twoDownStep);
		}
		pattern = pattern % 1000000007;
		map[Step] = pattern;
		return pattern;
	}
} public class Main {
	static int m;
	static int n;
	static int [] map;
	static List<Integer> list;
	static boolean [] stepExistence;
	public static void main(String[]args){
		Scanner scan = new Scanner (System.in);
		n = scan.nextInt();
		m = scan.nextInt();
		map = new int [n+1];
		list = new ArrayList<Integer>();
		stepExistence = new boolean[n+1];
		for(int i = 0;i < n+1;i++) {
			map[i] = -1;
			stepExistence[i] = true;
		}
		for(int i = 0; i < m;i++) {
			list.add(scan.nextInt());
			stepExistence[list.get(i)] = false;
		}
		map[0] = 1;
		map[1] = 1;
		int ans = downSteps(n);
		System.out.println(ans%1000000007);
	}
	public static int downSteps (int Step) {
		if(map[Step] > -1) {
			return map[Step];
		}
		int nextStep = Step-1;
		int twoDownStep = Step-2;
		int pattern = 0;
		if(stepExistence[nextStep]) {
			pattern = downSteps(nextStep);
			if(stepExistence[twoDownStep]) {
				pattern += downSteps(twoDownStep);
			}
		}else if(stepExistence[twoDownStep]) {
			pattern = downSteps(twoDownStep);
		}
		pattern = pattern % 1000000007;
		map[Step] = pattern;
		return pattern;
	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
	static int m;
	static int n;
	static int [] map;
	static List<Integer> list;
	static boolean [] stepExistence;
	public static void main(String[]args){
		Scanner scan = new Scanner (System.in);
		n = scan.nextInt();
		m = scan.nextInt();
		map = new int [n+1];
		list = new ArrayList<Integer>();
		stepExistence = new boolean[n+1];
		for(int i = 0;i < n+1;i++) {
			map[i] = -1;
			stepExistence[i] = true;
		}
		for(int i = 0; i < m;i++) {
			list.add(scan.nextInt());
			stepExistence[list.get(i)] = false;
		}
		map[0] = 1;
		map[1] = 1;
		int ans = downSteps(n);
		System.out.println(ans%1000000007);
	}
	public static int downSteps (int Step) {
		if(map[Step] > -1) {
			return map[Step];
		}
		int nextStep = Step-1;
		int twoDownStep = Step-2;
		int pattern = 0;
		if(stepExistence[nextStep]) {
			pattern = downSteps(nextStep);
			if(stepExistence[twoDownStep]) {
				pattern += downSteps(twoDownStep);
			}
		}else if(stepExistence[twoDownStep]) {
			pattern = downSteps(twoDownStep);
		}
		pattern = pattern % 1000000007;
		map[Step] = pattern;
		return pattern;
	}
}
