import java.util.*;

public class Main {
	static long MOD = (long) 1e9 + 7;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long dp[] = new long[n + 1];
		Arrays.fill(dp, -1);
		int m = sc.nextInt();
		final long MOD = 1_000_000_007l;
		int[] a = new int[m];
		for (int i = 0; i < m; i++) {
			a[i] = sc.nextInt();
			if (i >= 1 && a[i] - a[i - 1] == 1) {
				System.out.println(0);
				System.exit(0);
			}
			dp[a[i]] = 0;
		}
		sc.close();

		dp[0] = 1;
		for (int i = 1; i < n + 1; i++) {
			if (dp[i] == -1) {
				dp[i] = dp[i - 1] + (i >= 2 ? dp[i - 2] : 0);
				dp[i] %= MOD;
			}
		}
		System.out.println(dp[n]);
	}

	public static int arrayMax(int[] array) {
		int ans = Integer.MIN_VALUE;
		for (int i = 0; i < array.length; i++) {
			if (array[i] > ans)
				ans = array[i];
		}
		return ans;
	}

	public static int[] arrayInt(Scanner sc, int n) {
		int[] array = new int[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
		}
		return array;
	}

	public static Integer[] arrayInteger(Scanner sc, int n) {
		Integer[] array = new Integer[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
		}
		return array;
	}

	public static long[] arrayLong(Scanner sc, int n) {
		long[] array = new long[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextLong();
		}
		return array;
	}

	public static double[] arrayDouble(Scanner sc, int n) {
		double[] array = new double[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextDouble();
		}
		return array;
	}
} import java.util.*; util.* java public class Main {
	static long MOD = (long) 1e9 + 7;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long dp[] = new long[n + 1];
		Arrays.fill(dp, -1);
		int m = sc.nextInt();
		final long MOD = 1_000_000_007l;
		int[] a = new int[m];
		for (int i = 0; i < m; i++) {
			a[i] = sc.nextInt();
			if (i >= 1 && a[i] - a[i - 1] == 1) {
				System.out.println(0);
				System.exit(0);
			}
			dp[a[i]] = 0;
		}
		sc.close();

		dp[0] = 1;
		for (int i = 1; i < n + 1; i++) {
			if (dp[i] == -1) {
				dp[i] = dp[i - 1] + (i >= 2 ? dp[i - 2] : 0);
				dp[i] %= MOD;
			}
		}
		System.out.println(dp[n]);
	}

	public static int arrayMax(int[] array) {
		int ans = Integer.MIN_VALUE;
		for (int i = 0; i < array.length; i++) {
			if (array[i] > ans)
				ans = array[i];
		}
		return ans;
	}

	public static int[] arrayInt(Scanner sc, int n) {
		int[] array = new int[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
		}
		return array;
	}

	public static Integer[] arrayInteger(Scanner sc, int n) {
		Integer[] array = new Integer[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
		}
		return array;
	}

	public static long[] arrayLong(Scanner sc, int n) {
		long[] array = new long[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextLong();
		}
		return array;
	}

	public static double[] arrayDouble(Scanner sc, int n) {
		double[] array = new double[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextDouble();
		}
		return array;
	}
} Main static long MOD = (long) 1e9 + 7; MOD (long) 1e9 + 7 (long) 1e9 7 public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long dp[] = new long[n + 1];
		Arrays.fill(dp, -1);
		int m = sc.nextInt();
		final long MOD = 1_000_000_007l;
		int[] a = new int[m];
		for (int i = 0; i < m; i++) {
			a[i] = sc.nextInt();
			if (i >= 1 && a[i] - a[i - 1] == 1) {
				System.out.println(0);
				System.exit(0);
			}
			dp[a[i]] = 0;
		}
		sc.close();

		dp[0] = 1;
		for (int i = 1; i < n + 1; i++) {
			if (dp[i] == -1) {
				dp[i] = dp[i - 1] + (i >= 2 ? dp[i - 2] : 0);
				dp[i] %= MOD;
			}
		}
		System.out.println(dp[n]);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long dp[] = new long[n + 1];
		Arrays.fill(dp, -1);
		int m = sc.nextInt();
		final long MOD = 1_000_000_007l;
		int[] a = new int[m];
		for (int i = 0; i < m; i++) {
			a[i] = sc.nextInt();
			if (i >= 1 && a[i] - a[i - 1] == 1) {
				System.out.println(0);
				System.exit(0);
			}
			dp[a[i]] = 0;
		}
		sc.close();

		dp[0] = 1;
		for (int i = 1; i < n + 1; i++) {
			if (dp[i] == -1) {
				dp[i] = dp[i - 1] + (i >= 2 ? dp[i - 2] : 0);
				dp[i] %= MOD;
			}
		}
		System.out.println(dp[n]);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc long dp[] = new long[n + 1]; dp new long[n + 1] n + 1 n 1 Arrays.fill(dp, -1) Arrays.fill Arrays dp -1 1 int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc final long MOD = 1_000_000_007l; MOD 1_000_000_007l int[] a = new int[m]; a new int[m] m for (int i = 0; i < m; i++) {
			a[i] = sc.nextInt();
			if (i >= 1 && a[i] - a[i - 1] == 1) {
				System.out.println(0);
				System.exit(0);
			}
			dp[a[i]] = 0;
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			a[i] = sc.nextInt();
			if (i >= 1 && a[i] - a[i - 1] == 1) {
				System.out.println(0);
				System.exit(0);
			}
			dp[a[i]] = 0;
		} {
			a[i] = sc.nextInt();
			if (i >= 1 && a[i] - a[i - 1] == 1) {
				System.out.println(0);
				System.exit(0);
			}
			dp[a[i]] = 0;
		} a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc if (i >= 1 && a[i] - a[i - 1] == 1) {
				System.out.println(0);
				System.exit(0);
			} i >= 1 && a[i] - a[i - 1] == 1 i >= 1 i 1 a[i] - a[i - 1] == 1 a[i] - a[i - 1] a[i] a i a[i - 1] a i - 1 i 1 1 {
				System.out.println(0);
				System.exit(0);
			} System.out.println(0) System.out.println System.out System System.out 0 System.exit(0) System.exit System 0 dp[a[i]] = 0 dp[a[i]] dp a[i] a i 0 sc.close() sc.close sc dp[0] = 1 dp[0] dp 0 1 for (int i = 1; i < n + 1; i++) {
			if (dp[i] == -1) {
				dp[i] = dp[i - 1] + (i >= 2 ? dp[i - 2] : 0);
				dp[i] %= MOD;
			}
		} int i = 1; int i = 1; i 1 i < n + 1 i n + 1 n 1 i++ i++ i {
			if (dp[i] == -1) {
				dp[i] = dp[i - 1] + (i >= 2 ? dp[i - 2] : 0);
				dp[i] %= MOD;
			}
		} {
			if (dp[i] == -1) {
				dp[i] = dp[i - 1] + (i >= 2 ? dp[i - 2] : 0);
				dp[i] %= MOD;
			}
		} if (dp[i] == -1) {
				dp[i] = dp[i - 1] + (i >= 2 ? dp[i - 2] : 0);
				dp[i] %= MOD;
			} dp[i] == -1 dp[i] dp i -1 1 {
				dp[i] = dp[i - 1] + (i >= 2 ? dp[i - 2] : 0);
				dp[i] %= MOD;
			} dp[i] = dp[i - 1] + (i >= 2 ? dp[i - 2] : 0) dp[i] dp i dp[i - 1] + (i >= 2 ? dp[i - 2] : 0) dp[i - 1] dp i - 1 i 1 (i >= 2 ? dp[i - 2] : 0) i >= 2 i 2 dp[i - 2] dp i - 2 i 2 0 dp[i] %= MOD dp[i] dp i MOD System.out.println(dp[n]) System.out.println System.out System System.out dp[n] dp n String[] args args public static int arrayMax(int[] array) {
		int ans = Integer.MIN_VALUE;
		for (int i = 0; i < array.length; i++) {
			if (array[i] > ans)
				ans = array[i];
		}
		return ans;
	} arrayMax {
		int ans = Integer.MIN_VALUE;
		for (int i = 0; i < array.length; i++) {
			if (array[i] > ans)
				ans = array[i];
		}
		return ans;
	} int ans = Integer.MIN_VALUE; ans Integer.MIN_VALUE Integer Integer.MIN_VALUE for (int i = 0; i < array.length; i++) {
			if (array[i] > ans)
				ans = array[i];
		} int i = 0; int i = 0; i 0 i < array.length i array.length array array.length i++ i++ i {
			if (array[i] > ans)
				ans = array[i];
		} {
			if (array[i] > ans)
				ans = array[i];
		} if (array[i] > ans)
				ans = array[i]; array[i] > ans array[i] array i ans ans = array[i] ans array[i] array i return ans; ans int[] array array public static int[] arrayInt(Scanner sc, int n) {
		int[] array = new int[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
		}
		return array;
	} arrayInt {
		int[] array = new int[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
		}
		return array;
	} int[] array = new int[n]; array new int[n] n for (int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			array[i] = sc.nextInt();
		} {
			array[i] = sc.nextInt();
		} array[i] = sc.nextInt() array[i] array i sc.nextInt() sc.nextInt sc return array; array Scanner sc sc int n n public static Integer[] arrayInteger(Scanner sc, int n) {
		Integer[] array = new Integer[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
		}
		return array;
	} arrayInteger {
		Integer[] array = new Integer[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
		}
		return array;
	} Integer[] array = new Integer[n]; array new Integer[n] n for (int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			array[i] = sc.nextInt();
		} {
			array[i] = sc.nextInt();
		} array[i] = sc.nextInt() array[i] array i sc.nextInt() sc.nextInt sc return array; array Scanner sc sc int n n public static long[] arrayLong(Scanner sc, int n) {
		long[] array = new long[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextLong();
		}
		return array;
	} arrayLong {
		long[] array = new long[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextLong();
		}
		return array;
	} long[] array = new long[n]; array new long[n] n for (int i = 0; i < n; i++) {
			array[i] = sc.nextLong();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			array[i] = sc.nextLong();
		} {
			array[i] = sc.nextLong();
		} array[i] = sc.nextLong() array[i] array i sc.nextLong() sc.nextLong sc return array; array Scanner sc sc int n n public static double[] arrayDouble(Scanner sc, int n) {
		double[] array = new double[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextDouble();
		}
		return array;
	} arrayDouble {
		double[] array = new double[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextDouble();
		}
		return array;
	} double[] array = new double[n]; array new double[n] n for (int i = 0; i < n; i++) {
			array[i] = sc.nextDouble();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			array[i] = sc.nextDouble();
		} {
			array[i] = sc.nextDouble();
		} array[i] = sc.nextDouble() array[i] array i sc.nextDouble() sc.nextDouble sc return array; array Scanner sc sc int n n public class Main {
	static long MOD = (long) 1e9 + 7;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long dp[] = new long[n + 1];
		Arrays.fill(dp, -1);
		int m = sc.nextInt();
		final long MOD = 1_000_000_007l;
		int[] a = new int[m];
		for (int i = 0; i < m; i++) {
			a[i] = sc.nextInt();
			if (i >= 1 && a[i] - a[i - 1] == 1) {
				System.out.println(0);
				System.exit(0);
			}
			dp[a[i]] = 0;
		}
		sc.close();

		dp[0] = 1;
		for (int i = 1; i < n + 1; i++) {
			if (dp[i] == -1) {
				dp[i] = dp[i - 1] + (i >= 2 ? dp[i - 2] : 0);
				dp[i] %= MOD;
			}
		}
		System.out.println(dp[n]);
	}

	public static int arrayMax(int[] array) {
		int ans = Integer.MIN_VALUE;
		for (int i = 0; i < array.length; i++) {
			if (array[i] > ans)
				ans = array[i];
		}
		return ans;
	}

	public static int[] arrayInt(Scanner sc, int n) {
		int[] array = new int[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
		}
		return array;
	}

	public static Integer[] arrayInteger(Scanner sc, int n) {
		Integer[] array = new Integer[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
		}
		return array;
	}

	public static long[] arrayLong(Scanner sc, int n) {
		long[] array = new long[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextLong();
		}
		return array;
	}

	public static double[] arrayDouble(Scanner sc, int n) {
		double[] array = new double[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextDouble();
		}
		return array;
	}
} public class Main {
	static long MOD = (long) 1e9 + 7;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long dp[] = new long[n + 1];
		Arrays.fill(dp, -1);
		int m = sc.nextInt();
		final long MOD = 1_000_000_007l;
		int[] a = new int[m];
		for (int i = 0; i < m; i++) {
			a[i] = sc.nextInt();
			if (i >= 1 && a[i] - a[i - 1] == 1) {
				System.out.println(0);
				System.exit(0);
			}
			dp[a[i]] = 0;
		}
		sc.close();

		dp[0] = 1;
		for (int i = 1; i < n + 1; i++) {
			if (dp[i] == -1) {
				dp[i] = dp[i - 1] + (i >= 2 ? dp[i - 2] : 0);
				dp[i] %= MOD;
			}
		}
		System.out.println(dp[n]);
	}

	public static int arrayMax(int[] array) {
		int ans = Integer.MIN_VALUE;
		for (int i = 0; i < array.length; i++) {
			if (array[i] > ans)
				ans = array[i];
		}
		return ans;
	}

	public static int[] arrayInt(Scanner sc, int n) {
		int[] array = new int[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
		}
		return array;
	}

	public static Integer[] arrayInteger(Scanner sc, int n) {
		Integer[] array = new Integer[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
		}
		return array;
	}

	public static long[] arrayLong(Scanner sc, int n) {
		long[] array = new long[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextLong();
		}
		return array;
	}

	public static double[] arrayDouble(Scanner sc, int n) {
		double[] array = new double[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextDouble();
		}
		return array;
	}
} Main
import java.util.*;

public class Main {
	static long MOD = (long) 1e9 + 7;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long dp[] = new long[n + 1];
		Arrays.fill(dp, -1);
		int m = sc.nextInt();
		final long MOD = 1_000_000_007l;
		int[] a = new int[m];
		for (int i = 0; i < m; i++) {
			a[i] = sc.nextInt();
			if (i >= 1 && a[i] - a[i - 1] == 1) {
				System.out.println(0);
				System.exit(0);
			}
			dp[a[i]] = 0;
		}
		sc.close();

		dp[0] = 1;
		for (int i = 1; i < n + 1; i++) {
			if (dp[i] == -1) {
				dp[i] = dp[i - 1] + (i >= 2 ? dp[i - 2] : 0);
				dp[i] %= MOD;
			}
		}
		System.out.println(dp[n]);
	}

	public static int arrayMax(int[] array) {
		int ans = Integer.MIN_VALUE;
		for (int i = 0; i < array.length; i++) {
			if (array[i] > ans)
				ans = array[i];
		}
		return ans;
	}

	public static int[] arrayInt(Scanner sc, int n) {
		int[] array = new int[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
		}
		return array;
	}

	public static Integer[] arrayInteger(Scanner sc, int n) {
		Integer[] array = new Integer[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextInt();
		}
		return array;
	}

	public static long[] arrayLong(Scanner sc, int n) {
		long[] array = new long[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextLong();
		}
		return array;
	}

	public static double[] arrayDouble(Scanner sc, int n) {
		double[] array = new double[n];
		for (int i = 0; i < n; i++) {
			array[i] = sc.nextDouble();
		}
		return array;
	}
}
