import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(),m=sc.nextInt();
		long[] way = new long[n+1];
		boolean[] broken = new boolean[n+1];
		for(int i=0;i<m;i++) broken[sc.nextInt()]=true;
		for(int i=0;i<=n;i++) way[i]=-1;
		way[0]=1;
		if(broken[1]) way[1]=0;
		else way[1]=1;
		System.out.println(stair(n,broken,way));
	}

	static long stair(int n, boolean[] broken, long[] way) {
		final long mod = 1000000007;
		if(broken[n]) return 0;
		if(way[n]!=-1) return way[n];
		else{
			way[n] = (stair(n-1,broken,way)+stair(n-2,broken,way))%mod;
			return way[n];
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(),m=sc.nextInt();
		long[] way = new long[n+1];
		boolean[] broken = new boolean[n+1];
		for(int i=0;i<m;i++) broken[sc.nextInt()]=true;
		for(int i=0;i<=n;i++) way[i]=-1;
		way[0]=1;
		if(broken[1]) way[1]=0;
		else way[1]=1;
		System.out.println(stair(n,broken,way));
	}

	static long stair(int n, boolean[] broken, long[] way) {
		final long mod = 1000000007;
		if(broken[n]) return 0;
		if(way[n]!=-1) return way[n];
		else{
			way[n] = (stair(n-1,broken,way)+stair(n-2,broken,way))%mod;
			return way[n];
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(),m=sc.nextInt();
		long[] way = new long[n+1];
		boolean[] broken = new boolean[n+1];
		for(int i=0;i<m;i++) broken[sc.nextInt()]=true;
		for(int i=0;i<=n;i++) way[i]=-1;
		way[0]=1;
		if(broken[1]) way[1]=0;
		else way[1]=1;
		System.out.println(stair(n,broken,way));
	} main {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(),m=sc.nextInt();
		long[] way = new long[n+1];
		boolean[] broken = new boolean[n+1];
		for(int i=0;i<m;i++) broken[sc.nextInt()]=true;
		for(int i=0;i<=n;i++) way[i]=-1;
		way[0]=1;
		if(broken[1]) way[1]=0;
		else way[1]=1;
		System.out.println(stair(n,broken,way));
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt() n sc.nextInt() sc.nextInt sc m=sc.nextInt(); m sc.nextInt() sc.nextInt sc long[] way = new long[n+1]; way new long[n+1] n+1 n 1 boolean[] broken = new boolean[n+1]; broken new boolean[n+1] n+1 n 1 for(int i=0;i<m;i++) broken[sc.nextInt()]=true; int i=0; int i=0; i 0 i<m i m i++ i++ i broken[sc.nextInt()]=true; broken[sc.nextInt()]=true broken[sc.nextInt()] broken sc.nextInt() sc.nextInt sc true for(int i=0;i<=n;i++) way[i]=-1; int i=0; int i=0; i 0 i<=n i n i++ i++ i way[i]=-1; way[i]=-1 way[i] way i -1 1 way[0]=1 way[0] way 0 1 if(broken[1]) way[1]=0;
		else way[1]=1; broken[1] broken 1 way[1]=0 way[1] way 1 0 way[1]=1 way[1] way 1 1 System.out.println(stair(n,broken,way)) System.out.println System.out System System.out stair(n,broken,way) stair n broken way String[] args args static long stair(int n, boolean[] broken, long[] way) {
		final long mod = 1000000007;
		if(broken[n]) return 0;
		if(way[n]!=-1) return way[n];
		else{
			way[n] = (stair(n-1,broken,way)+stair(n-2,broken,way))%mod;
			return way[n];
		}
	} stair {
		final long mod = 1000000007;
		if(broken[n]) return 0;
		if(way[n]!=-1) return way[n];
		else{
			way[n] = (stair(n-1,broken,way)+stair(n-2,broken,way))%mod;
			return way[n];
		}
	} final long mod = 1000000007; mod 1000000007 if(broken[n]) return 0; broken[n] broken n return 0; 0 if(way[n]!=-1) return way[n];
		else{
			way[n] = (stair(n-1,broken,way)+stair(n-2,broken,way))%mod;
			return way[n];
		} way[n]!=-1 way[n] way n -1 1 return way[n]; way[n] way n {
			way[n] = (stair(n-1,broken,way)+stair(n-2,broken,way))%mod;
			return way[n];
		} way[n] = (stair(n-1,broken,way)+stair(n-2,broken,way))%mod way[n] way n (stair(n-1,broken,way)+stair(n-2,broken,way))%mod (stair(n-1,broken,way)+stair(n-2,broken,way)) stair(n-1,broken,way) stair n-1 n 1 broken way stair(n-2,broken,way) stair n-2 n 2 broken way mod return way[n]; way[n] way n int n n boolean[] broken broken long[] way way public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(),m=sc.nextInt();
		long[] way = new long[n+1];
		boolean[] broken = new boolean[n+1];
		for(int i=0;i<m;i++) broken[sc.nextInt()]=true;
		for(int i=0;i<=n;i++) way[i]=-1;
		way[0]=1;
		if(broken[1]) way[1]=0;
		else way[1]=1;
		System.out.println(stair(n,broken,way));
	}

	static long stair(int n, boolean[] broken, long[] way) {
		final long mod = 1000000007;
		if(broken[n]) return 0;
		if(way[n]!=-1) return way[n];
		else{
			way[n] = (stair(n-1,broken,way)+stair(n-2,broken,way))%mod;
			return way[n];
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(),m=sc.nextInt();
		long[] way = new long[n+1];
		boolean[] broken = new boolean[n+1];
		for(int i=0;i<m;i++) broken[sc.nextInt()]=true;
		for(int i=0;i<=n;i++) way[i]=-1;
		way[0]=1;
		if(broken[1]) way[1]=0;
		else way[1]=1;
		System.out.println(stair(n,broken,way));
	}

	static long stair(int n, boolean[] broken, long[] way) {
		final long mod = 1000000007;
		if(broken[n]) return 0;
		if(way[n]!=-1) return way[n];
		else{
			way[n] = (stair(n-1,broken,way)+stair(n-2,broken,way))%mod;
			return way[n];
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(),m=sc.nextInt();
		long[] way = new long[n+1];
		boolean[] broken = new boolean[n+1];
		for(int i=0;i<m;i++) broken[sc.nextInt()]=true;
		for(int i=0;i<=n;i++) way[i]=-1;
		way[0]=1;
		if(broken[1]) way[1]=0;
		else way[1]=1;
		System.out.println(stair(n,broken,way));
	}

	static long stair(int n, boolean[] broken, long[] way) {
		final long mod = 1000000007;
		if(broken[n]) return 0;
		if(way[n]!=-1) return way[n];
		else{
			way[n] = (stair(n-1,broken,way)+stair(n-2,broken,way))%mod;
			return way[n];
		}
	}
}
