	import java.util.ArrayList;
	import java.util.Arrays;
	import java.util.Collections;
	import java.util.Comparator;
	import java.util.HashMap;
	import java.util.HashSet;
	import java.util.List;
	import java.util.Map;
	import java.util.Map.Entry;
	import java.util.PriorityQueue;
	import java.util.Queue;
	import java.util.Scanner;
	import java.util.Set;

	public class Main{

		public static void main(String[] args) {

			Scanner scanner = new Scanner(System.in);
			String[] t = scanner.nextLine().split(" ");
			int n = Integer.parseInt(t[0]);
			int m = Integer.parseInt(t[1]);
			HashSet<Integer> set = new HashSet<>();

			for(int i = 0; i < m;i++) {
				set.add(scanner.nextInt() - 1);
			}

			long mod = 1000000007;

			long[] dp = new long[n];

			for(int i = 0; i < n; i++) {

				if(!set.contains(i)) {
					if(i == 0) {
						dp[0] = 1;
					}else if(i == 1) {
						dp[i] = dp[0] + 1;
					}else{

					dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
					}
				}

			}


			System.out.println(dp[n - 1]);
		}
	} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util import java.util.Comparator; Comparator java.util import java.util.HashMap; HashMap java.util import java.util.HashSet; HashSet java.util import java.util.List; List java.util import java.util.Map; Map java.util import java.util.Map.Entry; Entry java.util.Map import java.util.PriorityQueue; PriorityQueue java.util import java.util.Queue; Queue java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main{

		public static void main(String[] args) {

			Scanner scanner = new Scanner(System.in);
			String[] t = scanner.nextLine().split(" ");
			int n = Integer.parseInt(t[0]);
			int m = Integer.parseInt(t[1]);
			HashSet<Integer> set = new HashSet<>();

			for(int i = 0; i < m;i++) {
				set.add(scanner.nextInt() - 1);
			}

			long mod = 1000000007;

			long[] dp = new long[n];

			for(int i = 0; i < n; i++) {

				if(!set.contains(i)) {
					if(i == 0) {
						dp[0] = 1;
					}else if(i == 1) {
						dp[i] = dp[0] + 1;
					}else{

					dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
					}
				}

			}


			System.out.println(dp[n - 1]);
		}
	} Main public static void main(String[] args) {

			Scanner scanner = new Scanner(System.in);
			String[] t = scanner.nextLine().split(" ");
			int n = Integer.parseInt(t[0]);
			int m = Integer.parseInt(t[1]);
			HashSet<Integer> set = new HashSet<>();

			for(int i = 0; i < m;i++) {
				set.add(scanner.nextInt() - 1);
			}

			long mod = 1000000007;

			long[] dp = new long[n];

			for(int i = 0; i < n; i++) {

				if(!set.contains(i)) {
					if(i == 0) {
						dp[0] = 1;
					}else if(i == 1) {
						dp[i] = dp[0] + 1;
					}else{

					dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
					}
				}

			}


			System.out.println(dp[n - 1]);
		} main {

			Scanner scanner = new Scanner(System.in);
			String[] t = scanner.nextLine().split(" ");
			int n = Integer.parseInt(t[0]);
			int m = Integer.parseInt(t[1]);
			HashSet<Integer> set = new HashSet<>();

			for(int i = 0; i < m;i++) {
				set.add(scanner.nextInt() - 1);
			}

			long mod = 1000000007;

			long[] dp = new long[n];

			for(int i = 0; i < n; i++) {

				if(!set.contains(i)) {
					if(i == 0) {
						dp[0] = 1;
					}else if(i == 1) {
						dp[i] = dp[0] + 1;
					}else{

					dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
					}
				}

			}


			System.out.println(dp[n - 1]);
		} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String[] t = scanner.nextLine().split(" "); t scanner.nextLine().split(" ") scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " int n = Integer.parseInt(t[0]); n Integer.parseInt(t[0]) Integer.parseInt Integer t[0] t 0 int m = Integer.parseInt(t[1]); m Integer.parseInt(t[1]) Integer.parseInt Integer t[1] t 1 HashSet<Integer> set = new HashSet<>(); set new HashSet<>() for(int i = 0; i < m;i++) {
				set.add(scanner.nextInt() - 1);
			} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
				set.add(scanner.nextInt() - 1);
			} {
				set.add(scanner.nextInt() - 1);
			} set.add(scanner.nextInt() - 1) set.add set scanner.nextInt() - 1 scanner.nextInt() scanner.nextInt scanner 1 long mod = 1000000007; mod 1000000007 long[] dp = new long[n]; dp new long[n] n for(int i = 0; i < n; i++) {

				if(!set.contains(i)) {
					if(i == 0) {
						dp[0] = 1;
					}else if(i == 1) {
						dp[i] = dp[0] + 1;
					}else{

					dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
					}
				}

			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {

				if(!set.contains(i)) {
					if(i == 0) {
						dp[0] = 1;
					}else if(i == 1) {
						dp[i] = dp[0] + 1;
					}else{

					dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
					}
				}

			} {

				if(!set.contains(i)) {
					if(i == 0) {
						dp[0] = 1;
					}else if(i == 1) {
						dp[i] = dp[0] + 1;
					}else{

					dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
					}
				}

			} if(!set.contains(i)) {
					if(i == 0) {
						dp[0] = 1;
					}else if(i == 1) {
						dp[i] = dp[0] + 1;
					}else{

					dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
					}
				} !set.contains(i) set.contains(i) set.contains set i {
					if(i == 0) {
						dp[0] = 1;
					}else if(i == 1) {
						dp[i] = dp[0] + 1;
					}else{

					dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
					}
				} if(i == 0) {
						dp[0] = 1;
					}else if(i == 1) {
						dp[i] = dp[0] + 1;
					}else{

					dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
					} i == 0 i 0 {
						dp[0] = 1;
					} dp[0] = 1 dp[0] dp 0 1 if(i == 1) {
						dp[i] = dp[0] + 1;
					}else{

					dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
					} i == 1 i 1 {
						dp[i] = dp[0] + 1;
					} dp[i] = dp[0] + 1 dp[i] dp i dp[0] + 1 dp[0] dp 0 1 {

					dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
					} dp[i] = (dp[i - 1] + dp[i - 2]) % mod dp[i] dp i (dp[i - 1] + dp[i - 2]) % mod (dp[i - 1] + dp[i - 2]) dp[i - 1] dp i - 1 i 1 dp[i - 2] dp i - 2 i 2 mod System.out.println(dp[n - 1]) System.out.println System.out System System.out dp[n - 1] dp n - 1 n 1 String[] args args public class Main{

		public static void main(String[] args) {

			Scanner scanner = new Scanner(System.in);
			String[] t = scanner.nextLine().split(" ");
			int n = Integer.parseInt(t[0]);
			int m = Integer.parseInt(t[1]);
			HashSet<Integer> set = new HashSet<>();

			for(int i = 0; i < m;i++) {
				set.add(scanner.nextInt() - 1);
			}

			long mod = 1000000007;

			long[] dp = new long[n];

			for(int i = 0; i < n; i++) {

				if(!set.contains(i)) {
					if(i == 0) {
						dp[0] = 1;
					}else if(i == 1) {
						dp[i] = dp[0] + 1;
					}else{

					dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
					}
				}

			}


			System.out.println(dp[n - 1]);
		}
	} public class Main{

		public static void main(String[] args) {

			Scanner scanner = new Scanner(System.in);
			String[] t = scanner.nextLine().split(" ");
			int n = Integer.parseInt(t[0]);
			int m = Integer.parseInt(t[1]);
			HashSet<Integer> set = new HashSet<>();

			for(int i = 0; i < m;i++) {
				set.add(scanner.nextInt() - 1);
			}

			long mod = 1000000007;

			long[] dp = new long[n];

			for(int i = 0; i < n; i++) {

				if(!set.contains(i)) {
					if(i == 0) {
						dp[0] = 1;
					}else if(i == 1) {
						dp[i] = dp[0] + 1;
					}else{

					dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
					}
				}

			}


			System.out.println(dp[n - 1]);
		}
	} Main
	import java.util.ArrayList;
	import java.util.Arrays;
	import java.util.Collections;
	import java.util.Comparator;
	import java.util.HashMap;
	import java.util.HashSet;
	import java.util.List;
	import java.util.Map;
	import java.util.Map.Entry;
	import java.util.PriorityQueue;
	import java.util.Queue;
	import java.util.Scanner;
	import java.util.Set;

	public class Main{

		public static void main(String[] args) {

			Scanner scanner = new Scanner(System.in);
			String[] t = scanner.nextLine().split(" ");
			int n = Integer.parseInt(t[0]);
			int m = Integer.parseInt(t[1]);
			HashSet<Integer> set = new HashSet<>();

			for(int i = 0; i < m;i++) {
				set.add(scanner.nextInt() - 1);
			}

			long mod = 1000000007;

			long[] dp = new long[n];

			for(int i = 0; i < n; i++) {

				if(!set.contains(i)) {
					if(i == 0) {
						dp[0] = 1;
					}else if(i == 1) {
						dp[i] = dp[0] + 1;
					}else{

					dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
					}
				}

			}


			System.out.println(dp[n - 1]);
		}
	}