import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;

public class Main {

	private static final int MOD = 1000000007;

	public static void main(String[] args) {

		try(BufferedReader bf =
				new BufferedReader(new InputStreamReader(System.in))) {
			String[] s = bf.readLine().split(" ");
			int N = Integer.parseInt(s[0]);
			int M = Integer.parseInt(s[1]);
			boolean[] flag = new boolean[N+1];
			Arrays.fill(flag, true);
			ArrayList<Integer> a = new ArrayList<>();
			for(int i = 0;i < M;i++) {
				a.add(Integer.parseInt(bf.readLine()));
				flag[a.get(i)] = false;
			}

			int[] dp = new int[N+1];
			dp[0] = 1;
			for(int now = 0;now < N;now++) {
				for(int next = now+1;next <= Math.min(N, now+2);next++) {
					if(flag[next]) {
						dp[next] += dp[now];
						dp[next]%=MOD;
					}
				}
			}
			System.out.println(dp[N]);

		}catch(IOException e) {
			e.printStackTrace();
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util public class Main {

	private static final int MOD = 1000000007;

	public static void main(String[] args) {

		try(BufferedReader bf =
				new BufferedReader(new InputStreamReader(System.in))) {
			String[] s = bf.readLine().split(" ");
			int N = Integer.parseInt(s[0]);
			int M = Integer.parseInt(s[1]);
			boolean[] flag = new boolean[N+1];
			Arrays.fill(flag, true);
			ArrayList<Integer> a = new ArrayList<>();
			for(int i = 0;i < M;i++) {
				a.add(Integer.parseInt(bf.readLine()));
				flag[a.get(i)] = false;
			}

			int[] dp = new int[N+1];
			dp[0] = 1;
			for(int now = 0;now < N;now++) {
				for(int next = now+1;next <= Math.min(N, now+2);next++) {
					if(flag[next]) {
						dp[next] += dp[now];
						dp[next]%=MOD;
					}
				}
			}
			System.out.println(dp[N]);

		}catch(IOException e) {
			e.printStackTrace();
		}
	}
} Main private static final int MOD = 1000000007; MOD 1000000007 public static void main(String[] args) {

		try(BufferedReader bf =
				new BufferedReader(new InputStreamReader(System.in))) {
			String[] s = bf.readLine().split(" ");
			int N = Integer.parseInt(s[0]);
			int M = Integer.parseInt(s[1]);
			boolean[] flag = new boolean[N+1];
			Arrays.fill(flag, true);
			ArrayList<Integer> a = new ArrayList<>();
			for(int i = 0;i < M;i++) {
				a.add(Integer.parseInt(bf.readLine()));
				flag[a.get(i)] = false;
			}

			int[] dp = new int[N+1];
			dp[0] = 1;
			for(int now = 0;now < N;now++) {
				for(int next = now+1;next <= Math.min(N, now+2);next++) {
					if(flag[next]) {
						dp[next] += dp[now];
						dp[next]%=MOD;
					}
				}
			}
			System.out.println(dp[N]);

		}catch(IOException e) {
			e.printStackTrace();
		}
	} main {

		try(BufferedReader bf =
				new BufferedReader(new InputStreamReader(System.in))) {
			String[] s = bf.readLine().split(" ");
			int N = Integer.parseInt(s[0]);
			int M = Integer.parseInt(s[1]);
			boolean[] flag = new boolean[N+1];
			Arrays.fill(flag, true);
			ArrayList<Integer> a = new ArrayList<>();
			for(int i = 0;i < M;i++) {
				a.add(Integer.parseInt(bf.readLine()));
				flag[a.get(i)] = false;
			}

			int[] dp = new int[N+1];
			dp[0] = 1;
			for(int now = 0;now < N;now++) {
				for(int next = now+1;next <= Math.min(N, now+2);next++) {
					if(flag[next]) {
						dp[next] += dp[now];
						dp[next]%=MOD;
					}
				}
			}
			System.out.println(dp[N]);

		}catch(IOException e) {
			e.printStackTrace();
		}
	} try(BufferedReader bf =
				new BufferedReader(new InputStreamReader(System.in))) {
			String[] s = bf.readLine().split(" ");
			int N = Integer.parseInt(s[0]);
			int M = Integer.parseInt(s[1]);
			boolean[] flag = new boolean[N+1];
			Arrays.fill(flag, true);
			ArrayList<Integer> a = new ArrayList<>();
			for(int i = 0;i < M;i++) {
				a.add(Integer.parseInt(bf.readLine()));
				flag[a.get(i)] = false;
			}

			int[] dp = new int[N+1];
			dp[0] = 1;
			for(int now = 0;now < N;now++) {
				for(int next = now+1;next <= Math.min(N, now+2);next++) {
					if(flag[next]) {
						dp[next] += dp[now];
						dp[next]%=MOD;
					}
				}
			}
			System.out.println(dp[N]);

		}catch(IOException e) {
			e.printStackTrace();
		} catch(IOException e) {
			e.printStackTrace();
		} IOException e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			String[] s = bf.readLine().split(" ");
			int N = Integer.parseInt(s[0]);
			int M = Integer.parseInt(s[1]);
			boolean[] flag = new boolean[N+1];
			Arrays.fill(flag, true);
			ArrayList<Integer> a = new ArrayList<>();
			for(int i = 0;i < M;i++) {
				a.add(Integer.parseInt(bf.readLine()));
				flag[a.get(i)] = false;
			}

			int[] dp = new int[N+1];
			dp[0] = 1;
			for(int now = 0;now < N;now++) {
				for(int next = now+1;next <= Math.min(N, now+2);next++) {
					if(flag[next]) {
						dp[next] += dp[now];
						dp[next]%=MOD;
					}
				}
			}
			System.out.println(dp[N]);

		} BufferedReader bf =
				new BufferedReader(new InputStreamReader(System.in)) BufferedReader bf =
				new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) String[] s = bf.readLine().split(" "); s bf.readLine().split(" ") bf.readLine().split bf.readLine() bf.readLine bf " " int N = Integer.parseInt(s[0]); N Integer.parseInt(s[0]) Integer.parseInt Integer s[0] s 0 int M = Integer.parseInt(s[1]); M Integer.parseInt(s[1]) Integer.parseInt Integer s[1] s 1 boolean[] flag = new boolean[N+1]; flag new boolean[N+1] N+1 N 1 Arrays.fill(flag, true) Arrays.fill Arrays flag true ArrayList<Integer> a = new ArrayList<>(); a new ArrayList<>() for(int i = 0;i < M;i++) {
				a.add(Integer.parseInt(bf.readLine()));
				flag[a.get(i)] = false;
			} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
				a.add(Integer.parseInt(bf.readLine()));
				flag[a.get(i)] = false;
			} {
				a.add(Integer.parseInt(bf.readLine()));
				flag[a.get(i)] = false;
			} a.add(Integer.parseInt(bf.readLine())) a.add a Integer.parseInt(bf.readLine()) Integer.parseInt Integer bf.readLine() bf.readLine bf flag[a.get(i)] = false flag[a.get(i)] flag a.get(i) a.get a i false int[] dp = new int[N+1]; dp new int[N+1] N+1 N 1 dp[0] = 1 dp[0] dp 0 1 for(int now = 0;now < N;now++) {
				for(int next = now+1;next <= Math.min(N, now+2);next++) {
					if(flag[next]) {
						dp[next] += dp[now];
						dp[next]%=MOD;
					}
				}
			} int now = 0; int now = 0; now 0 now < N now N now++ now++ now {
				for(int next = now+1;next <= Math.min(N, now+2);next++) {
					if(flag[next]) {
						dp[next] += dp[now];
						dp[next]%=MOD;
					}
				}
			} {
				for(int next = now+1;next <= Math.min(N, now+2);next++) {
					if(flag[next]) {
						dp[next] += dp[now];
						dp[next]%=MOD;
					}
				}
			} for(int next = now+1;next <= Math.min(N, now+2);next++) {
					if(flag[next]) {
						dp[next] += dp[now];
						dp[next]%=MOD;
					}
				} int next = now+1; int next = now+1; next now+1 now 1 next <= Math.min(N, now+2) next Math.min(N, now+2) Math.min Math N now+2 now 2 next++ next++ next {
					if(flag[next]) {
						dp[next] += dp[now];
						dp[next]%=MOD;
					}
				} {
					if(flag[next]) {
						dp[next] += dp[now];
						dp[next]%=MOD;
					}
				} if(flag[next]) {
						dp[next] += dp[now];
						dp[next]%=MOD;
					} flag[next] flag next {
						dp[next] += dp[now];
						dp[next]%=MOD;
					} dp[next] += dp[now] dp[next] dp next dp[now] dp now dp[next]%=MOD dp[next] dp next MOD System.out.println(dp[N]) System.out.println System.out System System.out dp[N] dp N String[] args args public class Main {

	private static final int MOD = 1000000007;

	public static void main(String[] args) {

		try(BufferedReader bf =
				new BufferedReader(new InputStreamReader(System.in))) {
			String[] s = bf.readLine().split(" ");
			int N = Integer.parseInt(s[0]);
			int M = Integer.parseInt(s[1]);
			boolean[] flag = new boolean[N+1];
			Arrays.fill(flag, true);
			ArrayList<Integer> a = new ArrayList<>();
			for(int i = 0;i < M;i++) {
				a.add(Integer.parseInt(bf.readLine()));
				flag[a.get(i)] = false;
			}

			int[] dp = new int[N+1];
			dp[0] = 1;
			for(int now = 0;now < N;now++) {
				for(int next = now+1;next <= Math.min(N, now+2);next++) {
					if(flag[next]) {
						dp[next] += dp[now];
						dp[next]%=MOD;
					}
				}
			}
			System.out.println(dp[N]);

		}catch(IOException e) {
			e.printStackTrace();
		}
	}
} public class Main {

	private static final int MOD = 1000000007;

	public static void main(String[] args) {

		try(BufferedReader bf =
				new BufferedReader(new InputStreamReader(System.in))) {
			String[] s = bf.readLine().split(" ");
			int N = Integer.parseInt(s[0]);
			int M = Integer.parseInt(s[1]);
			boolean[] flag = new boolean[N+1];
			Arrays.fill(flag, true);
			ArrayList<Integer> a = new ArrayList<>();
			for(int i = 0;i < M;i++) {
				a.add(Integer.parseInt(bf.readLine()));
				flag[a.get(i)] = false;
			}

			int[] dp = new int[N+1];
			dp[0] = 1;
			for(int now = 0;now < N;now++) {
				for(int next = now+1;next <= Math.min(N, now+2);next++) {
					if(flag[next]) {
						dp[next] += dp[now];
						dp[next]%=MOD;
					}
				}
			}
			System.out.println(dp[N]);

		}catch(IOException e) {
			e.printStackTrace();
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;

public class Main {

	private static final int MOD = 1000000007;

	public static void main(String[] args) {

		try(BufferedReader bf =
				new BufferedReader(new InputStreamReader(System.in))) {
			String[] s = bf.readLine().split(" ");
			int N = Integer.parseInt(s[0]);
			int M = Integer.parseInt(s[1]);
			boolean[] flag = new boolean[N+1];
			Arrays.fill(flag, true);
			ArrayList<Integer> a = new ArrayList<>();
			for(int i = 0;i < M;i++) {
				a.add(Integer.parseInt(bf.readLine()));
				flag[a.get(i)] = false;
			}

			int[] dp = new int[N+1];
			dp[0] = 1;
			for(int now = 0;now < N;now++) {
				for(int next = now+1;next <= Math.min(N, now+2);next++) {
					if(flag[next]) {
						dp[next] += dp[now];
						dp[next]%=MOD;
					}
				}
			}
			System.out.println(dp[N]);

		}catch(IOException e) {
			e.printStackTrace();
		}
	}
}