import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * 2019/06/09
 * AtCoder Beginner Contest 129
 * 
 * C - Typical Stairs
 * 
 * @author rued97
 */
public class Main {
	
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int MOD = 1000000007;
		int N = sc.nextInt();
		int M = sc.nextInt();
		Set<Integer> as = new HashSet<>();
		for(int i = 0; i < M; i++) {
			as.add(sc.nextInt());
		}
		
		long pre1 = 0;
		long pre2 = 1;
		long now = 0;
		
		for(int i = 1; i <= N; i++) {
			if(as.contains(i)) {
				now = 0;
			} else {
				now = (pre1 + pre2) % MOD;
			}
			pre1 = pre2;
			pre2 = now;
			if(pre1 == 0 && pre2 == 0) {
				break;
			}
		}
		
		System.out.println(now);
	}
	
} import java.util.HashSet; HashSet 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 sc = new Scanner(System.in);
		
		int MOD = 1000000007;
		int N = sc.nextInt();
		int M = sc.nextInt();
		Set<Integer> as = new HashSet<>();
		for(int i = 0; i < M; i++) {
			as.add(sc.nextInt());
		}
		
		long pre1 = 0;
		long pre2 = 1;
		long now = 0;
		
		for(int i = 1; i <= N; i++) {
			if(as.contains(i)) {
				now = 0;
			} else {
				now = (pre1 + pre2) % MOD;
			}
			pre1 = pre2;
			pre2 = now;
			if(pre1 == 0 && pre2 == 0) {
				break;
			}
		}
		
		System.out.println(now);
	}
	
} Main public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int MOD = 1000000007;
		int N = sc.nextInt();
		int M = sc.nextInt();
		Set<Integer> as = new HashSet<>();
		for(int i = 0; i < M; i++) {
			as.add(sc.nextInt());
		}
		
		long pre1 = 0;
		long pre2 = 1;
		long now = 0;
		
		for(int i = 1; i <= N; i++) {
			if(as.contains(i)) {
				now = 0;
			} else {
				now = (pre1 + pre2) % MOD;
			}
			pre1 = pre2;
			pre2 = now;
			if(pre1 == 0 && pre2 == 0) {
				break;
			}
		}
		
		System.out.println(now);
	} main {
		
		Scanner sc = new Scanner(System.in);
		
		int MOD = 1000000007;
		int N = sc.nextInt();
		int M = sc.nextInt();
		Set<Integer> as = new HashSet<>();
		for(int i = 0; i < M; i++) {
			as.add(sc.nextInt());
		}
		
		long pre1 = 0;
		long pre2 = 1;
		long now = 0;
		
		for(int i = 1; i <= N; i++) {
			if(as.contains(i)) {
				now = 0;
			} else {
				now = (pre1 + pre2) % MOD;
			}
			pre1 = pre2;
			pre2 = now;
			if(pre1 == 0 && pre2 == 0) {
				break;
			}
		}
		
		System.out.println(now);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int MOD = 1000000007; MOD 1000000007 int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc Set<Integer> as = new HashSet<>(); as new HashSet<>() for(int i = 0; i < M; i++) {
			as.add(sc.nextInt());
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			as.add(sc.nextInt());
		} {
			as.add(sc.nextInt());
		} as.add(sc.nextInt()) as.add as sc.nextInt() sc.nextInt sc long pre1 = 0; pre1 0 long pre2 = 1; pre2 1 long now = 0; now 0 for(int i = 1; i <= N; i++) {
			if(as.contains(i)) {
				now = 0;
			} else {
				now = (pre1 + pre2) % MOD;
			}
			pre1 = pre2;
			pre2 = now;
			if(pre1 == 0 && pre2 == 0) {
				break;
			}
		} int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
			if(as.contains(i)) {
				now = 0;
			} else {
				now = (pre1 + pre2) % MOD;
			}
			pre1 = pre2;
			pre2 = now;
			if(pre1 == 0 && pre2 == 0) {
				break;
			}
		} {
			if(as.contains(i)) {
				now = 0;
			} else {
				now = (pre1 + pre2) % MOD;
			}
			pre1 = pre2;
			pre2 = now;
			if(pre1 == 0 && pre2 == 0) {
				break;
			}
		} if(as.contains(i)) {
				now = 0;
			} else {
				now = (pre1 + pre2) % MOD;
			} as.contains(i) as.contains as i {
				now = 0;
			} now = 0 now 0 {
				now = (pre1 + pre2) % MOD;
			} now = (pre1 + pre2) % MOD now (pre1 + pre2) % MOD (pre1 + pre2) pre1 pre2 MOD pre1 = pre2 pre1 pre2 pre2 = now pre2 now if(pre1 == 0 && pre2 == 0) {
				break;
			} pre1 == 0 && pre2 == 0 pre1 == 0 pre1 0 pre2 == 0 pre2 0 {
				break;
			} break; System.out.println(now) System.out.println System.out System System.out now String[] args args public class Main {
	
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int MOD = 1000000007;
		int N = sc.nextInt();
		int M = sc.nextInt();
		Set<Integer> as = new HashSet<>();
		for(int i = 0; i < M; i++) {
			as.add(sc.nextInt());
		}
		
		long pre1 = 0;
		long pre2 = 1;
		long now = 0;
		
		for(int i = 1; i <= N; i++) {
			if(as.contains(i)) {
				now = 0;
			} else {
				now = (pre1 + pre2) % MOD;
			}
			pre1 = pre2;
			pre2 = now;
			if(pre1 == 0 && pre2 == 0) {
				break;
			}
		}
		
		System.out.println(now);
	}
	
} public class Main {
	
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int MOD = 1000000007;
		int N = sc.nextInt();
		int M = sc.nextInt();
		Set<Integer> as = new HashSet<>();
		for(int i = 0; i < M; i++) {
			as.add(sc.nextInt());
		}
		
		long pre1 = 0;
		long pre2 = 1;
		long now = 0;
		
		for(int i = 1; i <= N; i++) {
			if(as.contains(i)) {
				now = 0;
			} else {
				now = (pre1 + pre2) % MOD;
			}
			pre1 = pre2;
			pre2 = now;
			if(pre1 == 0 && pre2 == 0) {
				break;
			}
		}
		
		System.out.println(now);
	}
	
} Main
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * 2019/06/09
 * AtCoder Beginner Contest 129
 * 
 * C - Typical Stairs
 * 
 * @author rued97
 */
public class Main {
	
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int MOD = 1000000007;
		int N = sc.nextInt();
		int M = sc.nextInt();
		Set<Integer> as = new HashSet<>();
		for(int i = 0; i < M; i++) {
			as.add(sc.nextInt());
		}
		
		long pre1 = 0;
		long pre2 = 1;
		long now = 0;
		
		for(int i = 1; i <= N; i++) {
			if(as.contains(i)) {
				now = 0;
			} else {
				now = (pre1 + pre2) % MOD;
			}
			pre1 = pre2;
			pre2 = now;
			if(pre1 == 0 && pre2 == 0) {
				break;
			}
		}
		
		System.out.println(now);
	}
	
}