import java.util.*;

public class Main {
	static final int MOD = 1000000007;
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] arr = new int[n + 1];
		HashSet<Integer> set = new HashSet<>();
		for (int i = 0; i < m; i ++) {
			set.add(sc.nextInt());
		}
		arr[0] = 1;
		if (set.contains(1)) {
			arr[1] = 0;
		} else {
			arr[1] = 1;
		}
		for (int i = 2; i <= n; i++) {
			if (set.contains(i)) {
				arr[i] = 0;
			} else {
				int x = arr[i - 2] + arr[i - 1];
				x %= MOD;
				arr[i] = x;
			}
		}
		System.out.println(arr[n]);
	}
} import java.util.*; util.* java public class Main {
	static final int MOD = 1000000007;
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] arr = new int[n + 1];
		HashSet<Integer> set = new HashSet<>();
		for (int i = 0; i < m; i ++) {
			set.add(sc.nextInt());
		}
		arr[0] = 1;
		if (set.contains(1)) {
			arr[1] = 0;
		} else {
			arr[1] = 1;
		}
		for (int i = 2; i <= n; i++) {
			if (set.contains(i)) {
				arr[i] = 0;
			} else {
				int x = arr[i - 2] + arr[i - 1];
				x %= MOD;
				arr[i] = x;
			}
		}
		System.out.println(arr[n]);
	}
} Main static final int MOD = 1000000007; MOD 1000000007 public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] arr = new int[n + 1];
		HashSet<Integer> set = new HashSet<>();
		for (int i = 0; i < m; i ++) {
			set.add(sc.nextInt());
		}
		arr[0] = 1;
		if (set.contains(1)) {
			arr[1] = 0;
		} else {
			arr[1] = 1;
		}
		for (int i = 2; i <= n; i++) {
			if (set.contains(i)) {
				arr[i] = 0;
			} else {
				int x = arr[i - 2] + arr[i - 1];
				x %= MOD;
				arr[i] = x;
			}
		}
		System.out.println(arr[n]);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] arr = new int[n + 1];
		HashSet<Integer> set = new HashSet<>();
		for (int i = 0; i < m; i ++) {
			set.add(sc.nextInt());
		}
		arr[0] = 1;
		if (set.contains(1)) {
			arr[1] = 0;
		} else {
			arr[1] = 1;
		}
		for (int i = 2; i <= n; i++) {
			if (set.contains(i)) {
				arr[i] = 0;
			} else {
				int x = arr[i - 2] + arr[i - 1];
				x %= MOD;
				arr[i] = x;
			}
		}
		System.out.println(arr[n]);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int[] arr = new int[n + 1]; arr new int[n + 1] n + 1 n 1 HashSet<Integer> set = new HashSet<>(); set new HashSet<>() for (int i = 0; i < m; i ++) {
			set.add(sc.nextInt());
		} int i = 0; int i = 0; i 0 i < m i m i ++ i ++ i {
			set.add(sc.nextInt());
		} {
			set.add(sc.nextInt());
		} set.add(sc.nextInt()) set.add set sc.nextInt() sc.nextInt sc arr[0] = 1 arr[0] arr 0 1 if (set.contains(1)) {
			arr[1] = 0;
		} else {
			arr[1] = 1;
		} set.contains(1) set.contains set 1 {
			arr[1] = 0;
		} arr[1] = 0 arr[1] arr 1 0 {
			arr[1] = 1;
		} arr[1] = 1 arr[1] arr 1 1 for (int i = 2; i <= n; i++) {
			if (set.contains(i)) {
				arr[i] = 0;
			} else {
				int x = arr[i - 2] + arr[i - 1];
				x %= MOD;
				arr[i] = x;
			}
		} int i = 2; int i = 2; i 2 i <= n i n i++ i++ i {
			if (set.contains(i)) {
				arr[i] = 0;
			} else {
				int x = arr[i - 2] + arr[i - 1];
				x %= MOD;
				arr[i] = x;
			}
		} {
			if (set.contains(i)) {
				arr[i] = 0;
			} else {
				int x = arr[i - 2] + arr[i - 1];
				x %= MOD;
				arr[i] = x;
			}
		} if (set.contains(i)) {
				arr[i] = 0;
			} else {
				int x = arr[i - 2] + arr[i - 1];
				x %= MOD;
				arr[i] = x;
			} set.contains(i) set.contains set i {
				arr[i] = 0;
			} arr[i] = 0 arr[i] arr i 0 {
				int x = arr[i - 2] + arr[i - 1];
				x %= MOD;
				arr[i] = x;
			} int x = arr[i - 2] + arr[i - 1]; x arr[i - 2] + arr[i - 1] arr[i - 2] arr i - 2 i 2 arr[i - 1] arr i - 1 i 1 x %= MOD x MOD arr[i] = x arr[i] arr i x System.out.println(arr[n]) System.out.println System.out System System.out arr[n] arr n String[] args args public class Main {
	static final int MOD = 1000000007;
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] arr = new int[n + 1];
		HashSet<Integer> set = new HashSet<>();
		for (int i = 0; i < m; i ++) {
			set.add(sc.nextInt());
		}
		arr[0] = 1;
		if (set.contains(1)) {
			arr[1] = 0;
		} else {
			arr[1] = 1;
		}
		for (int i = 2; i <= n; i++) {
			if (set.contains(i)) {
				arr[i] = 0;
			} else {
				int x = arr[i - 2] + arr[i - 1];
				x %= MOD;
				arr[i] = x;
			}
		}
		System.out.println(arr[n]);
	}
} public class Main {
	static final int MOD = 1000000007;
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] arr = new int[n + 1];
		HashSet<Integer> set = new HashSet<>();
		for (int i = 0; i < m; i ++) {
			set.add(sc.nextInt());
		}
		arr[0] = 1;
		if (set.contains(1)) {
			arr[1] = 0;
		} else {
			arr[1] = 1;
		}
		for (int i = 2; i <= n; i++) {
			if (set.contains(i)) {
				arr[i] = 0;
			} else {
				int x = arr[i - 2] + arr[i - 1];
				x %= MOD;
				arr[i] = x;
			}
		}
		System.out.println(arr[n]);
	}
} Main
import java.util.*;

public class Main {
	static final int MOD = 1000000007;
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] arr = new int[n + 1];
		HashSet<Integer> set = new HashSet<>();
		for (int i = 0; i < m; i ++) {
			set.add(sc.nextInt());
		}
		arr[0] = 1;
		if (set.contains(1)) {
			arr[1] = 0;
		} else {
			arr[1] = 1;
		}
		for (int i = 2; i <= n; i++) {
			if (set.contains(i)) {
				arr[i] = 0;
			} else {
				int x = arr[i - 2] + arr[i - 1];
				x %= MOD;
				arr[i] = x;
			}
		}
		System.out.println(arr[n]);
	}
}
