import java.util.*;
public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M= scan.nextInt();
		int m = 1000000007;
		HashSet<Integer> map = new HashSet<>();
		for (int i=0;i<M;i++) {
			map.add(scan.nextInt());
		}
		int[] grid = new int[N+1];
		grid[0] = 1;
		for (int i=1;i<=N;i++) {
			if (!map.contains(i)) {
				if (i-1>=0 && !map.contains(i-1)) {
					grid[i] = (grid[i]%m+grid[i-1]%m)%m;
				}
				if (i-2>=0 && !map.contains(i-2)) {
					grid[i] = (grid[i]%m+grid[i-2]%m)%m;
				}
			}
		}
		System.out.println(grid[N]);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M= scan.nextInt();
		int m = 1000000007;
		HashSet<Integer> map = new HashSet<>();
		for (int i=0;i<M;i++) {
			map.add(scan.nextInt());
		}
		int[] grid = new int[N+1];
		grid[0] = 1;
		for (int i=1;i<=N;i++) {
			if (!map.contains(i)) {
				if (i-1>=0 && !map.contains(i-1)) {
					grid[i] = (grid[i]%m+grid[i-1]%m)%m;
				}
				if (i-2>=0 && !map.contains(i-2)) {
					grid[i] = (grid[i]%m+grid[i-2]%m)%m;
				}
			}
		}
		System.out.println(grid[N]);
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M= scan.nextInt();
		int m = 1000000007;
		HashSet<Integer> map = new HashSet<>();
		for (int i=0;i<M;i++) {
			map.add(scan.nextInt());
		}
		int[] grid = new int[N+1];
		grid[0] = 1;
		for (int i=1;i<=N;i++) {
			if (!map.contains(i)) {
				if (i-1>=0 && !map.contains(i-1)) {
					grid[i] = (grid[i]%m+grid[i-1]%m)%m;
				}
				if (i-2>=0 && !map.contains(i-2)) {
					grid[i] = (grid[i]%m+grid[i-2]%m)%m;
				}
			}
		}
		System.out.println(grid[N]);
	} main {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M= scan.nextInt();
		int m = 1000000007;
		HashSet<Integer> map = new HashSet<>();
		for (int i=0;i<M;i++) {
			map.add(scan.nextInt());
		}
		int[] grid = new int[N+1];
		grid[0] = 1;
		for (int i=1;i<=N;i++) {
			if (!map.contains(i)) {
				if (i-1>=0 && !map.contains(i-1)) {
					grid[i] = (grid[i]%m+grid[i-1]%m)%m;
				}
				if (i-2>=0 && !map.contains(i-2)) {
					grid[i] = (grid[i]%m+grid[i-2]%m)%m;
				}
			}
		}
		System.out.println(grid[N]);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int M= scan.nextInt(); M scan.nextInt() scan.nextInt scan int m = 1000000007; m 1000000007 HashSet<Integer> map = new HashSet<>(); map new HashSet<>() for (int i=0;i<M;i++) {
			map.add(scan.nextInt());
		} int i=0; int i=0; i 0 i<M i M i++ i++ i {
			map.add(scan.nextInt());
		} {
			map.add(scan.nextInt());
		} map.add(scan.nextInt()) map.add map scan.nextInt() scan.nextInt scan int[] grid = new int[N+1]; grid new int[N+1] N+1 N 1 grid[0] = 1 grid[0] grid 0 1 for (int i=1;i<=N;i++) {
			if (!map.contains(i)) {
				if (i-1>=0 && !map.contains(i-1)) {
					grid[i] = (grid[i]%m+grid[i-1]%m)%m;
				}
				if (i-2>=0 && !map.contains(i-2)) {
					grid[i] = (grid[i]%m+grid[i-2]%m)%m;
				}
			}
		} int i=1; int i=1; i 1 i<=N i N i++ i++ i {
			if (!map.contains(i)) {
				if (i-1>=0 && !map.contains(i-1)) {
					grid[i] = (grid[i]%m+grid[i-1]%m)%m;
				}
				if (i-2>=0 && !map.contains(i-2)) {
					grid[i] = (grid[i]%m+grid[i-2]%m)%m;
				}
			}
		} {
			if (!map.contains(i)) {
				if (i-1>=0 && !map.contains(i-1)) {
					grid[i] = (grid[i]%m+grid[i-1]%m)%m;
				}
				if (i-2>=0 && !map.contains(i-2)) {
					grid[i] = (grid[i]%m+grid[i-2]%m)%m;
				}
			}
		} if (!map.contains(i)) {
				if (i-1>=0 && !map.contains(i-1)) {
					grid[i] = (grid[i]%m+grid[i-1]%m)%m;
				}
				if (i-2>=0 && !map.contains(i-2)) {
					grid[i] = (grid[i]%m+grid[i-2]%m)%m;
				}
			} !map.contains(i) map.contains(i) map.contains map i {
				if (i-1>=0 && !map.contains(i-1)) {
					grid[i] = (grid[i]%m+grid[i-1]%m)%m;
				}
				if (i-2>=0 && !map.contains(i-2)) {
					grid[i] = (grid[i]%m+grid[i-2]%m)%m;
				}
			} if (i-1>=0 && !map.contains(i-1)) {
					grid[i] = (grid[i]%m+grid[i-1]%m)%m;
				} i-1>=0 && !map.contains(i-1) i-1>=0 i-1 i 1 0 !map.contains(i-1) map.contains(i-1) map.contains map i-1 i 1 {
					grid[i] = (grid[i]%m+grid[i-1]%m)%m;
				} grid[i] = (grid[i]%m+grid[i-1]%m)%m grid[i] grid i (grid[i]%m+grid[i-1]%m)%m (grid[i]%m+grid[i-1]%m) grid[i]%m grid[i] grid i m grid[i-1]%m grid[i-1] grid i-1 i 1 m m if (i-2>=0 && !map.contains(i-2)) {
					grid[i] = (grid[i]%m+grid[i-2]%m)%m;
				} i-2>=0 && !map.contains(i-2) i-2>=0 i-2 i 2 0 !map.contains(i-2) map.contains(i-2) map.contains map i-2 i 2 {
					grid[i] = (grid[i]%m+grid[i-2]%m)%m;
				} grid[i] = (grid[i]%m+grid[i-2]%m)%m grid[i] grid i (grid[i]%m+grid[i-2]%m)%m (grid[i]%m+grid[i-2]%m) grid[i]%m grid[i] grid i m grid[i-2]%m grid[i-2] grid i-2 i 2 m m System.out.println(grid[N]) System.out.println System.out System System.out grid[N] grid N String[] args args public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M= scan.nextInt();
		int m = 1000000007;
		HashSet<Integer> map = new HashSet<>();
		for (int i=0;i<M;i++) {
			map.add(scan.nextInt());
		}
		int[] grid = new int[N+1];
		grid[0] = 1;
		for (int i=1;i<=N;i++) {
			if (!map.contains(i)) {
				if (i-1>=0 && !map.contains(i-1)) {
					grid[i] = (grid[i]%m+grid[i-1]%m)%m;
				}
				if (i-2>=0 && !map.contains(i-2)) {
					grid[i] = (grid[i]%m+grid[i-2]%m)%m;
				}
			}
		}
		System.out.println(grid[N]);
	}
} public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M= scan.nextInt();
		int m = 1000000007;
		HashSet<Integer> map = new HashSet<>();
		for (int i=0;i<M;i++) {
			map.add(scan.nextInt());
		}
		int[] grid = new int[N+1];
		grid[0] = 1;
		for (int i=1;i<=N;i++) {
			if (!map.contains(i)) {
				if (i-1>=0 && !map.contains(i-1)) {
					grid[i] = (grid[i]%m+grid[i-1]%m)%m;
				}
				if (i-2>=0 && !map.contains(i-2)) {
					grid[i] = (grid[i]%m+grid[i-2]%m)%m;
				}
			}
		}
		System.out.println(grid[N]);
	}
} Main
import java.util.*;
public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M= scan.nextInt();
		int m = 1000000007;
		HashSet<Integer> map = new HashSet<>();
		for (int i=0;i<M;i++) {
			map.add(scan.nextInt());
		}
		int[] grid = new int[N+1];
		grid[0] = 1;
		for (int i=1;i<=N;i++) {
			if (!map.contains(i)) {
				if (i-1>=0 && !map.contains(i-1)) {
					grid[i] = (grid[i]%m+grid[i-1]%m)%m;
				}
				if (i-2>=0 && !map.contains(i-2)) {
					grid[i] = (grid[i]%m+grid[i-2]%m)%m;
				}
			}
		}
		System.out.println(grid[N]);
	}
}