import java.util.Scanner;

public class Main {
	Integer steps[];
	Long results[];

	public Main(int n, Integer a[]) {
		steps = new Integer[n];
		results = new Long[n];
		for (int i = 0; i < steps.length; i++) {
			steps[i] = 1;
			results[i] = -1L;
		}
		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));
	}

	public long calc(int prefix) {
		Long shortcut = results[prefix];
		long result;
		if (shortcut != -1L) {
			return shortcut;
		}
		if (prefix >= steps.length) {
			result = 0;
		} else if (prefix == steps.length - 1) {
			result = 1;
		} else if (prefix == steps.length - 2) {
			result = 1 + (((steps[prefix + 1] == 1) ? 1 : 0));
		} else {
			result = (((steps[prefix + 1] == 1) ? calc(prefix + 1) : 0) +
					((steps[prefix + 2] == 1) ? calc(prefix + 2)
							: 0));
			result %=  1_000_000_007L;
		}
		results[prefix] = result;
		return result;
	}
} import java.util.Scanner; Scanner java.util public class Main {
	Integer steps[];
	Long results[];

	public Main(int n, Integer a[]) {
		steps = new Integer[n];
		results = new Long[n];
		for (int i = 0; i < steps.length; i++) {
			steps[i] = 1;
			results[i] = -1L;
		}
		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));
	}

	public long calc(int prefix) {
		Long shortcut = results[prefix];
		long result;
		if (shortcut != -1L) {
			return shortcut;
		}
		if (prefix >= steps.length) {
			result = 0;
		} else if (prefix == steps.length - 1) {
			result = 1;
		} else if (prefix == steps.length - 2) {
			result = 1 + (((steps[prefix + 1] == 1) ? 1 : 0));
		} else {
			result = (((steps[prefix + 1] == 1) ? calc(prefix + 1) : 0) +
					((steps[prefix + 2] == 1) ? calc(prefix + 2)
							: 0));
			result %=  1_000_000_007L;
		}
		results[prefix] = result;
		return result;
	}
} Main Integer steps[]; steps Long results[]; results public Main(int n, Integer a[]) {
		steps = new Integer[n];
		results = new Long[n];
		for (int i = 0; i < steps.length; i++) {
			steps[i] = 1;
			results[i] = -1L;
		}
		for (int e : a) {
			steps[e] = 0;
		}

	} Main {
		steps = new Integer[n];
		results = new Long[n];
		for (int i = 0; i < steps.length; i++) {
			steps[i] = 1;
			results[i] = -1L;
		}
		for (int e : a) {
			steps[e] = 0;
		}

	} steps = new Integer[n] steps new Integer[n] n results = new Long[n] results new Long[n] n for (int i = 0; i < steps.length; i++) {
			steps[i] = 1;
			results[i] = -1L;
		} int i = 0; int i = 0; i 0 i < steps.length i steps.length steps steps.length i++ i++ i {
			steps[i] = 1;
			results[i] = -1L;
		} {
			steps[i] = 1;
			results[i] = -1L;
		} steps[i] = 1 steps[i] steps i 1 results[i] = -1L results[i] results i -1L 1L 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));
	} 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));
	} 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)) System.out.println System.out System System.out new Main(n, a).calc(0) new Main(n, a).calc new Main(n, a) 0 String[] args args public long calc(int prefix) {
		Long shortcut = results[prefix];
		long result;
		if (shortcut != -1L) {
			return shortcut;
		}
		if (prefix >= steps.length) {
			result = 0;
		} else if (prefix == steps.length - 1) {
			result = 1;
		} else if (prefix == steps.length - 2) {
			result = 1 + (((steps[prefix + 1] == 1) ? 1 : 0));
		} else {
			result = (((steps[prefix + 1] == 1) ? calc(prefix + 1) : 0) +
					((steps[prefix + 2] == 1) ? calc(prefix + 2)
							: 0));
			result %=  1_000_000_007L;
		}
		results[prefix] = result;
		return result;
	} calc {
		Long shortcut = results[prefix];
		long result;
		if (shortcut != -1L) {
			return shortcut;
		}
		if (prefix >= steps.length) {
			result = 0;
		} else if (prefix == steps.length - 1) {
			result = 1;
		} else if (prefix == steps.length - 2) {
			result = 1 + (((steps[prefix + 1] == 1) ? 1 : 0));
		} else {
			result = (((steps[prefix + 1] == 1) ? calc(prefix + 1) : 0) +
					((steps[prefix + 2] == 1) ? calc(prefix + 2)
							: 0));
			result %=  1_000_000_007L;
		}
		results[prefix] = result;
		return result;
	} Long shortcut = results[prefix]; shortcut results[prefix] results prefix long result; result if (shortcut != -1L) {
			return shortcut;
		} shortcut != -1L shortcut -1L 1L {
			return shortcut;
		} return shortcut; shortcut if (prefix >= steps.length) {
			result = 0;
		} else if (prefix == steps.length - 1) {
			result = 1;
		} else if (prefix == steps.length - 2) {
			result = 1 + (((steps[prefix + 1] == 1) ? 1 : 0));
		} else {
			result = (((steps[prefix + 1] == 1) ? calc(prefix + 1) : 0) +
					((steps[prefix + 2] == 1) ? calc(prefix + 2)
							: 0));
			result %=  1_000_000_007L;
		} prefix >= steps.length prefix steps.length steps steps.length {
			result = 0;
		} result = 0 result 0 if (prefix == steps.length - 1) {
			result = 1;
		} else if (prefix == steps.length - 2) {
			result = 1 + (((steps[prefix + 1] == 1) ? 1 : 0));
		} else {
			result = (((steps[prefix + 1] == 1) ? calc(prefix + 1) : 0) +
					((steps[prefix + 2] == 1) ? calc(prefix + 2)
							: 0));
			result %=  1_000_000_007L;
		} prefix == steps.length - 1 prefix steps.length - 1 steps.length steps steps.length 1 {
			result = 1;
		} result = 1 result 1 if (prefix == steps.length - 2) {
			result = 1 + (((steps[prefix + 1] == 1) ? 1 : 0));
		} else {
			result = (((steps[prefix + 1] == 1) ? calc(prefix + 1) : 0) +
					((steps[prefix + 2] == 1) ? calc(prefix + 2)
							: 0));
			result %=  1_000_000_007L;
		} prefix == steps.length - 2 prefix steps.length - 2 steps.length steps steps.length 2 {
			result = 1 + (((steps[prefix + 1] == 1) ? 1 : 0));
		} result = 1 + (((steps[prefix + 1] == 1) ? 1 : 0)) result 1 + (((steps[prefix + 1] == 1) ? 1 : 0)) 1 (((steps[prefix + 1] == 1) ? 1 : 0)) (steps[prefix + 1] == 1) steps[prefix + 1] steps prefix + 1 prefix 1 1 1 0 {
			result = (((steps[prefix + 1] == 1) ? calc(prefix + 1) : 0) +
					((steps[prefix + 2] == 1) ? calc(prefix + 2)
							: 0));
			result %=  1_000_000_007L;
		} result = (((steps[prefix + 1] == 1) ? calc(prefix + 1) : 0) +
					((steps[prefix + 2] == 1) ? calc(prefix + 2)
							: 0)) result (((steps[prefix + 1] == 1) ? calc(prefix + 1) : 0) +
					((steps[prefix + 2] == 1) ? calc(prefix + 2)
							: 0)) ((steps[prefix + 1] == 1) ? calc(prefix + 1) : 0) (steps[prefix + 1] == 1) steps[prefix + 1] steps prefix + 1 prefix 1 1 calc(prefix + 1) calc prefix + 1 prefix 1 0 ((steps[prefix + 2] == 1) ? calc(prefix + 2)
							: 0) (steps[prefix + 2] == 1) steps[prefix + 2] steps prefix + 2 prefix 2 1 calc(prefix + 2) calc prefix + 2 prefix 2 0 result %=  1_000_000_007L result 1_000_000_007L results[prefix] = result results[prefix] results prefix result return result; result int prefix prefix public class Main {
	Integer steps[];
	Long results[];

	public Main(int n, Integer a[]) {
		steps = new Integer[n];
		results = new Long[n];
		for (int i = 0; i < steps.length; i++) {
			steps[i] = 1;
			results[i] = -1L;
		}
		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));
	}

	public long calc(int prefix) {
		Long shortcut = results[prefix];
		long result;
		if (shortcut != -1L) {
			return shortcut;
		}
		if (prefix >= steps.length) {
			result = 0;
		} else if (prefix == steps.length - 1) {
			result = 1;
		} else if (prefix == steps.length - 2) {
			result = 1 + (((steps[prefix + 1] == 1) ? 1 : 0));
		} else {
			result = (((steps[prefix + 1] == 1) ? calc(prefix + 1) : 0) +
					((steps[prefix + 2] == 1) ? calc(prefix + 2)
							: 0));
			result %=  1_000_000_007L;
		}
		results[prefix] = result;
		return result;
	}
} public class Main {
	Integer steps[];
	Long results[];

	public Main(int n, Integer a[]) {
		steps = new Integer[n];
		results = new Long[n];
		for (int i = 0; i < steps.length; i++) {
			steps[i] = 1;
			results[i] = -1L;
		}
		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));
	}

	public long calc(int prefix) {
		Long shortcut = results[prefix];
		long result;
		if (shortcut != -1L) {
			return shortcut;
		}
		if (prefix >= steps.length) {
			result = 0;
		} else if (prefix == steps.length - 1) {
			result = 1;
		} else if (prefix == steps.length - 2) {
			result = 1 + (((steps[prefix + 1] == 1) ? 1 : 0));
		} else {
			result = (((steps[prefix + 1] == 1) ? calc(prefix + 1) : 0) +
					((steps[prefix + 2] == 1) ? calc(prefix + 2)
							: 0));
			result %=  1_000_000_007L;
		}
		results[prefix] = result;
		return result;
	}
} Main
import java.util.Scanner;

public class Main {
	Integer steps[];
	Long results[];

	public Main(int n, Integer a[]) {
		steps = new Integer[n];
		results = new Long[n];
		for (int i = 0; i < steps.length; i++) {
			steps[i] = 1;
			results[i] = -1L;
		}
		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));
	}

	public long calc(int prefix) {
		Long shortcut = results[prefix];
		long result;
		if (shortcut != -1L) {
			return shortcut;
		}
		if (prefix >= steps.length) {
			result = 0;
		} else if (prefix == steps.length - 1) {
			result = 1;
		} else if (prefix == steps.length - 2) {
			result = 1 + (((steps[prefix + 1] == 1) ? 1 : 0));
		} else {
			result = (((steps[prefix + 1] == 1) ? calc(prefix + 1) : 0) +
					((steps[prefix + 2] == 1) ? calc(prefix + 2)
							: 0));
			result %=  1_000_000_007L;
		}
		results[prefix] = result;
		return result;
	}
}