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

public class Main {
	Integer steps[];
	Map<Integer, BigInteger> map;

	public Main(int n, Integer a[]) {
		steps = new Integer[n];
		map = new TreeMap<>();
		for (int i = 0; i < steps.length; i++) {
			steps[i] = 1;
		}
		for (int e : a) {
			steps[e] = 0;
		}

	}

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int m = s.nextInt();
		Integer a[] = new Integer[m];
		for (int i = 0; i < m; i++) {
			a[i] = s.nextInt();
		}
		System.out.println(
				new Main(n, a).calc(0).mod(new BigInteger("1000000007")));
	}

	public BigInteger calc(int prefix) {
		BigInteger shortcut = map.get(prefix);
		BigInteger result;
		if (shortcut != null) {
			return shortcut;
		}
		if (prefix >= steps.length) {
			result = BigInteger.ZERO;
		} else if (prefix == steps.length - 1) {
			result = BigInteger.ONE;
		} else if (prefix == steps.length - 2) {
			result = BigInteger.ONE
					.add(((steps[prefix + 1] == 1) ? BigInteger.ONE
							: BigInteger.ZERO));
		} else {
			result = ((steps[prefix + 1] == 1) ? calc(prefix + 1)
					: BigInteger.ZERO)
							.add((steps[prefix + 2] == 1) ? calc(prefix + 2)
									: BigInteger.ZERO);
		}
		map.put(prefix, result);
		return result;
	}
} import java.math.BigInteger; BigInteger java.math import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util import java.util.TreeMap; TreeMap java.util public class Main {
	Integer steps[];
	Map<Integer, BigInteger> map;

	public Main(int n, Integer a[]) {
		steps = new Integer[n];
		map = new TreeMap<>();
		for (int i = 0; i < steps.length; i++) {
			steps[i] = 1;
		}
		for (int e : a) {
			steps[e] = 0;
		}

	}

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int m = s.nextInt();
		Integer a[] = new Integer[m];
		for (int i = 0; i < m; i++) {
			a[i] = s.nextInt();
		}
		System.out.println(
				new Main(n, a).calc(0).mod(new BigInteger("1000000007")));
	}

	public BigInteger calc(int prefix) {
		BigInteger shortcut = map.get(prefix);
		BigInteger result;
		if (shortcut != null) {
			return shortcut;
		}
		if (prefix >= steps.length) {
			result = BigInteger.ZERO;
		} else if (prefix == steps.length - 1) {
			result = BigInteger.ONE;
		} else if (prefix == steps.length - 2) {
			result = BigInteger.ONE
					.add(((steps[prefix + 1] == 1) ? BigInteger.ONE
							: BigInteger.ZERO));
		} else {
			result = ((steps[prefix + 1] == 1) ? calc(prefix + 1)
					: BigInteger.ZERO)
							.add((steps[prefix + 2] == 1) ? calc(prefix + 2)
									: BigInteger.ZERO);
		}
		map.put(prefix, result);
		return result;
	}
} Main Integer steps[]; steps Map<Integer, BigInteger> map; map public Main(int n, Integer a[]) {
		steps = new Integer[n];
		map = new TreeMap<>();
		for (int i = 0; i < steps.length; i++) {
			steps[i] = 1;
		}
		for (int e : a) {
			steps[e] = 0;
		}

	} Main {
		steps = new Integer[n];
		map = new TreeMap<>();
		for (int i = 0; i < steps.length; i++) {
			steps[i] = 1;
		}
		for (int e : a) {
			steps[e] = 0;
		}

	} steps = new Integer[n] steps new Integer[n] n map = new TreeMap<>() map new TreeMap<>() for (int i = 0; i < steps.length; i++) {
			steps[i] = 1;
		} int i = 0; int i = 0; i 0 i < steps.length i steps.length steps steps.length i++ i++ i {
			steps[i] = 1;
		} {
			steps[i] = 1;
		} steps[i] = 1 steps[i] steps i 1 for (int e : a) {
			steps[e] = 0;
		} int e a {
			steps[e] = 0;
		} {
			steps[e] = 0;
		} steps[e] = 0 steps[e] steps e 0 int n n Integer a[] a public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int m = s.nextInt();
		Integer a[] = new Integer[m];
		for (int i = 0; i < m; i++) {
			a[i] = s.nextInt();
		}
		System.out.println(
				new Main(n, a).calc(0).mod(new BigInteger("1000000007")));
	} main {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int m = s.nextInt();
		Integer a[] = new Integer[m];
		for (int i = 0; i < m; i++) {
			a[i] = s.nextInt();
		}
		System.out.println(
				new Main(n, a).calc(0).mod(new BigInteger("1000000007")));
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = s.nextInt(); n s.nextInt() s.nextInt s int m = s.nextInt(); m s.nextInt() s.nextInt s Integer a[] = new Integer[m]; a new Integer[m] m for (int i = 0; i < m; i++) {
			a[i] = s.nextInt();
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			a[i] = s.nextInt();
		} {
			a[i] = s.nextInt();
		} a[i] = s.nextInt() a[i] a i s.nextInt() s.nextInt s System.out.println(
				new Main(n, a).calc(0).mod(new BigInteger("1000000007"))) System.out.println System.out System System.out new Main(n, a).calc(0).mod(new BigInteger("1000000007")) new Main(n, a).calc(0).mod new Main(n, a).calc(0) new Main(n, a).calc new Main(n, a) 0 new BigInteger("1000000007") String[] args args public BigInteger calc(int prefix) {
		BigInteger shortcut = map.get(prefix);
		BigInteger result;
		if (shortcut != null) {
			return shortcut;
		}
		if (prefix >= steps.length) {
			result = BigInteger.ZERO;
		} else if (prefix == steps.length - 1) {
			result = BigInteger.ONE;
		} else if (prefix == steps.length - 2) {
			result = BigInteger.ONE
					.add(((steps[prefix + 1] == 1) ? BigInteger.ONE
							: BigInteger.ZERO));
		} else {
			result = ((steps[prefix + 1] == 1) ? calc(prefix + 1)
					: BigInteger.ZERO)
							.add((steps[prefix + 2] == 1) ? calc(prefix + 2)
									: BigInteger.ZERO);
		}
		map.put(prefix, result);
		return result;
	} calc {
		BigInteger shortcut = map.get(prefix);
		BigInteger result;
		if (shortcut != null) {
			return shortcut;
		}
		if (prefix >= steps.length) {
			result = BigInteger.ZERO;
		} else if (prefix == steps.length - 1) {
			result = BigInteger.ONE;
		} else if (prefix == steps.length - 2) {
			result = BigInteger.ONE
					.add(((steps[prefix + 1] == 1) ? BigInteger.ONE
							: BigInteger.ZERO));
		} else {
			result = ((steps[prefix + 1] == 1) ? calc(prefix + 1)
					: BigInteger.ZERO)
							.add((steps[prefix + 2] == 1) ? calc(prefix + 2)
									: BigInteger.ZERO);
		}
		map.put(prefix, result);
		return result;
	} BigInteger shortcut = map.get(prefix); shortcut map.get(prefix) map.get map prefix BigInteger result; result if (shortcut != null) {
			return shortcut;
		} shortcut != null shortcut null {
			return shortcut;
		} return shortcut; shortcut if (prefix >= steps.length) {
			result = BigInteger.ZERO;
		} else if (prefix == steps.length - 1) {
			result = BigInteger.ONE;
		} else if (prefix == steps.length - 2) {
			result = BigInteger.ONE
					.add(((steps[prefix + 1] == 1) ? BigInteger.ONE
							: BigInteger.ZERO));
		} else {
			result = ((steps[prefix + 1] == 1) ? calc(prefix + 1)
					: BigInteger.ZERO)
							.add((steps[prefix + 2] == 1) ? calc(prefix + 2)
									: BigInteger.ZERO);
		} prefix >= steps.length prefix steps.length steps steps.length {
			result = BigInteger.ZERO;
		} result = BigInteger.ZERO result BigInteger.ZERO BigInteger BigInteger.ZERO if (prefix == steps.length - 1) {
			result = BigInteger.ONE;
		} else if (prefix == steps.length - 2) {
			result = BigInteger.ONE
					.add(((steps[prefix + 1] == 1) ? BigInteger.ONE
							: BigInteger.ZERO));
		} else {
			result = ((steps[prefix + 1] == 1) ? calc(prefix + 1)
					: BigInteger.ZERO)
							.add((steps[prefix + 2] == 1) ? calc(prefix + 2)
									: BigInteger.ZERO);
		} prefix == steps.length - 1 prefix steps.length - 1 steps.length steps steps.length 1 {
			result = BigInteger.ONE;
		} result = BigInteger.ONE result BigInteger.ONE BigInteger BigInteger.ONE if (prefix == steps.length - 2) {
			result = BigInteger.ONE
					.add(((steps[prefix + 1] == 1) ? BigInteger.ONE
							: BigInteger.ZERO));
		} else {
			result = ((steps[prefix + 1] == 1) ? calc(prefix + 1)
					: BigInteger.ZERO)
							.add((steps[prefix + 2] == 1) ? calc(prefix + 2)
									: BigInteger.ZERO);
		} prefix == steps.length - 2 prefix steps.length - 2 steps.length steps steps.length 2 {
			result = BigInteger.ONE
					.add(((steps[prefix + 1] == 1) ? BigInteger.ONE
							: BigInteger.ZERO));
		} result = BigInteger.ONE
					.add(((steps[prefix + 1] == 1) ? BigInteger.ONE
							: BigInteger.ZERO)) result BigInteger.ONE
					.add(((steps[prefix + 1] == 1) ? BigInteger.ONE
							: BigInteger.ZERO)) BigInteger.ONE
					.add BigInteger.ONE BigInteger BigInteger.ONE ((steps[prefix + 1] == 1) ? BigInteger.ONE
							: BigInteger.ZERO) (steps[prefix + 1] == 1) steps[prefix + 1] steps prefix + 1 prefix 1 1 BigInteger.ONE BigInteger BigInteger.ONE BigInteger.ZERO BigInteger BigInteger.ZERO {
			result = ((steps[prefix + 1] == 1) ? calc(prefix + 1)
					: BigInteger.ZERO)
							.add((steps[prefix + 2] == 1) ? calc(prefix + 2)
									: BigInteger.ZERO);
		} result = ((steps[prefix + 1] == 1) ? calc(prefix + 1)
					: BigInteger.ZERO)
							.add((steps[prefix + 2] == 1) ? calc(prefix + 2)
									: BigInteger.ZERO) result ((steps[prefix + 1] == 1) ? calc(prefix + 1)
					: BigInteger.ZERO)
							.add((steps[prefix + 2] == 1) ? calc(prefix + 2)
									: BigInteger.ZERO) ((steps[prefix + 1] == 1) ? calc(prefix + 1)
					: BigInteger.ZERO)
							.add ((steps[prefix + 1] == 1) ? calc(prefix + 1)
					: BigInteger.ZERO) (steps[prefix + 1] == 1) steps[prefix + 1] steps prefix + 1 prefix 1 1 calc(prefix + 1) calc prefix + 1 prefix 1 BigInteger.ZERO BigInteger BigInteger.ZERO (steps[prefix + 2] == 1) ? calc(prefix + 2)
									: BigInteger.ZERO (steps[prefix + 2] == 1) steps[prefix + 2] steps prefix + 2 prefix 2 1 calc(prefix + 2) calc prefix + 2 prefix 2 BigInteger.ZERO BigInteger BigInteger.ZERO map.put(prefix, result) map.put map prefix result return result; result int prefix prefix public class Main {
	Integer steps[];
	Map<Integer, BigInteger> map;

	public Main(int n, Integer a[]) {
		steps = new Integer[n];
		map = new TreeMap<>();
		for (int i = 0; i < steps.length; i++) {
			steps[i] = 1;
		}
		for (int e : a) {
			steps[e] = 0;
		}

	}

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int m = s.nextInt();
		Integer a[] = new Integer[m];
		for (int i = 0; i < m; i++) {
			a[i] = s.nextInt();
		}
		System.out.println(
				new Main(n, a).calc(0).mod(new BigInteger("1000000007")));
	}

	public BigInteger calc(int prefix) {
		BigInteger shortcut = map.get(prefix);
		BigInteger result;
		if (shortcut != null) {
			return shortcut;
		}
		if (prefix >= steps.length) {
			result = BigInteger.ZERO;
		} else if (prefix == steps.length - 1) {
			result = BigInteger.ONE;
		} else if (prefix == steps.length - 2) {
			result = BigInteger.ONE
					.add(((steps[prefix + 1] == 1) ? BigInteger.ONE
							: BigInteger.ZERO));
		} else {
			result = ((steps[prefix + 1] == 1) ? calc(prefix + 1)
					: BigInteger.ZERO)
							.add((steps[prefix + 2] == 1) ? calc(prefix + 2)
									: BigInteger.ZERO);
		}
		map.put(prefix, result);
		return result;
	}
} public class Main {
	Integer steps[];
	Map<Integer, BigInteger> map;

	public Main(int n, Integer a[]) {
		steps = new Integer[n];
		map = new TreeMap<>();
		for (int i = 0; i < steps.length; i++) {
			steps[i] = 1;
		}
		for (int e : a) {
			steps[e] = 0;
		}

	}

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int m = s.nextInt();
		Integer a[] = new Integer[m];
		for (int i = 0; i < m; i++) {
			a[i] = s.nextInt();
		}
		System.out.println(
				new Main(n, a).calc(0).mod(new BigInteger("1000000007")));
	}

	public BigInteger calc(int prefix) {
		BigInteger shortcut = map.get(prefix);
		BigInteger result;
		if (shortcut != null) {
			return shortcut;
		}
		if (prefix >= steps.length) {
			result = BigInteger.ZERO;
		} else if (prefix == steps.length - 1) {
			result = BigInteger.ONE;
		} else if (prefix == steps.length - 2) {
			result = BigInteger.ONE
					.add(((steps[prefix + 1] == 1) ? BigInteger.ONE
							: BigInteger.ZERO));
		} else {
			result = ((steps[prefix + 1] == 1) ? calc(prefix + 1)
					: BigInteger.ZERO)
							.add((steps[prefix + 2] == 1) ? calc(prefix + 2)
									: BigInteger.ZERO);
		}
		map.put(prefix, result);
		return result;
	}
} Main
import java.math.BigInteger;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

public class Main {
	Integer steps[];
	Map<Integer, BigInteger> map;

	public Main(int n, Integer a[]) {
		steps = new Integer[n];
		map = new TreeMap<>();
		for (int i = 0; i < steps.length; i++) {
			steps[i] = 1;
		}
		for (int e : a) {
			steps[e] = 0;
		}

	}

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int m = s.nextInt();
		Integer a[] = new Integer[m];
		for (int i = 0; i < m; i++) {
			a[i] = s.nextInt();
		}
		System.out.println(
				new Main(n, a).calc(0).mod(new BigInteger("1000000007")));
	}

	public BigInteger calc(int prefix) {
		BigInteger shortcut = map.get(prefix);
		BigInteger result;
		if (shortcut != null) {
			return shortcut;
		}
		if (prefix >= steps.length) {
			result = BigInteger.ZERO;
		} else if (prefix == steps.length - 1) {
			result = BigInteger.ONE;
		} else if (prefix == steps.length - 2) {
			result = BigInteger.ONE
					.add(((steps[prefix + 1] == 1) ? BigInteger.ONE
							: BigInteger.ZERO));
		} else {
			result = ((steps[prefix + 1] == 1) ? calc(prefix + 1)
					: BigInteger.ZERO)
							.add((steps[prefix + 2] == 1) ? calc(prefix + 2)
									: BigInteger.ZERO);
		}
		map.put(prefix, result);
		return result;
	}
}