import java.util.*;
import java.io.*;

public class Main
{
	public static void main(String [] Args)
	{
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int m=in.nextInt();
		long [] vis=new long [n+1];
		vis[0]=1;
		for(int i=0;i<m;i++)
		{
			int k=in.nextInt();
			vis[k]=-1;
		}
		if(vis[1]!=-1)
			vis[1]=1;
		for(int i=2;i<=n;i++)
		{
			if(vis[i]!=-1)
			{
				if(vis[i-1]==-1)
					vis[i]=vis[i-2];
				else if(vis[i-2]==-1)
					vis[i]=vis[i-1];
				else
				    vis[i]=(vis[i-1]+vis[i-2])%1000000007;
			}
		}
		if(vis[n]==-1)
			vis[n]=0;
		System.out.println(vis[n]);
	}
}
	 import java.util.*; util.* java import java.io.*; io.* java public class Main
{
	public static void main(String [] Args)
	{
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int m=in.nextInt();
		long [] vis=new long [n+1];
		vis[0]=1;
		for(int i=0;i<m;i++)
		{
			int k=in.nextInt();
			vis[k]=-1;
		}
		if(vis[1]!=-1)
			vis[1]=1;
		for(int i=2;i<=n;i++)
		{
			if(vis[i]!=-1)
			{
				if(vis[i-1]==-1)
					vis[i]=vis[i-2];
				else if(vis[i-2]==-1)
					vis[i]=vis[i-1];
				else
				    vis[i]=(vis[i-1]+vis[i-2])%1000000007;
			}
		}
		if(vis[n]==-1)
			vis[n]=0;
		System.out.println(vis[n]);
	}
} Main public static void main(String [] Args)
	{
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int m=in.nextInt();
		long [] vis=new long [n+1];
		vis[0]=1;
		for(int i=0;i<m;i++)
		{
			int k=in.nextInt();
			vis[k]=-1;
		}
		if(vis[1]!=-1)
			vis[1]=1;
		for(int i=2;i<=n;i++)
		{
			if(vis[i]!=-1)
			{
				if(vis[i-1]==-1)
					vis[i]=vis[i-2];
				else if(vis[i-2]==-1)
					vis[i]=vis[i-1];
				else
				    vis[i]=(vis[i-1]+vis[i-2])%1000000007;
			}
		}
		if(vis[n]==-1)
			vis[n]=0;
		System.out.println(vis[n]);
	} main {
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int m=in.nextInt();
		long [] vis=new long [n+1];
		vis[0]=1;
		for(int i=0;i<m;i++)
		{
			int k=in.nextInt();
			vis[k]=-1;
		}
		if(vis[1]!=-1)
			vis[1]=1;
		for(int i=2;i<=n;i++)
		{
			if(vis[i]!=-1)
			{
				if(vis[i-1]==-1)
					vis[i]=vis[i-2];
				else if(vis[i-2]==-1)
					vis[i]=vis[i-1];
				else
				    vis[i]=(vis[i-1]+vis[i-2])%1000000007;
			}
		}
		if(vis[n]==-1)
			vis[n]=0;
		System.out.println(vis[n]);
	} Scanner in=new Scanner(System.in); in new Scanner(System.in) int n=in.nextInt(); n in.nextInt() in.nextInt in int m=in.nextInt(); m in.nextInt() in.nextInt in long [] vis=new long [n+1]; vis new long [n+1] n+1 n 1 vis[0]=1 vis[0] vis 0 1 for(int i=0;i<m;i++)
		{
			int k=in.nextInt();
			vis[k]=-1;
		} int i=0; int i=0; i 0 i<m i m i++ i++ i {
			int k=in.nextInt();
			vis[k]=-1;
		} {
			int k=in.nextInt();
			vis[k]=-1;
		} int k=in.nextInt(); k in.nextInt() in.nextInt in vis[k]=-1 vis[k] vis k -1 1 if(vis[1]!=-1)
			vis[1]=1; vis[1]!=-1 vis[1] vis 1 -1 1 vis[1]=1 vis[1] vis 1 1 for(int i=2;i<=n;i++)
		{
			if(vis[i]!=-1)
			{
				if(vis[i-1]==-1)
					vis[i]=vis[i-2];
				else if(vis[i-2]==-1)
					vis[i]=vis[i-1];
				else
				    vis[i]=(vis[i-1]+vis[i-2])%1000000007;
			}
		} int i=2; int i=2; i 2 i<=n i n i++ i++ i {
			if(vis[i]!=-1)
			{
				if(vis[i-1]==-1)
					vis[i]=vis[i-2];
				else if(vis[i-2]==-1)
					vis[i]=vis[i-1];
				else
				    vis[i]=(vis[i-1]+vis[i-2])%1000000007;
			}
		} {
			if(vis[i]!=-1)
			{
				if(vis[i-1]==-1)
					vis[i]=vis[i-2];
				else if(vis[i-2]==-1)
					vis[i]=vis[i-1];
				else
				    vis[i]=(vis[i-1]+vis[i-2])%1000000007;
			}
		} if(vis[i]!=-1)
			{
				if(vis[i-1]==-1)
					vis[i]=vis[i-2];
				else if(vis[i-2]==-1)
					vis[i]=vis[i-1];
				else
				    vis[i]=(vis[i-1]+vis[i-2])%1000000007;
			} vis[i]!=-1 vis[i] vis i -1 1 {
				if(vis[i-1]==-1)
					vis[i]=vis[i-2];
				else if(vis[i-2]==-1)
					vis[i]=vis[i-1];
				else
				    vis[i]=(vis[i-1]+vis[i-2])%1000000007;
			} if(vis[i-1]==-1)
					vis[i]=vis[i-2];
				else if(vis[i-2]==-1)
					vis[i]=vis[i-1];
				else
				    vis[i]=(vis[i-1]+vis[i-2])%1000000007; vis[i-1]==-1 vis[i-1] vis i-1 i 1 -1 1 vis[i]=vis[i-2] vis[i] vis i vis[i-2] vis i-2 i 2 if(vis[i-2]==-1)
					vis[i]=vis[i-1];
				else
				    vis[i]=(vis[i-1]+vis[i-2])%1000000007; vis[i-2]==-1 vis[i-2] vis i-2 i 2 -1 1 vis[i]=vis[i-1] vis[i] vis i vis[i-1] vis i-1 i 1 vis[i]=(vis[i-1]+vis[i-2])%1000000007 vis[i] vis i (vis[i-1]+vis[i-2])%1000000007 (vis[i-1]+vis[i-2]) vis[i-1] vis i-1 i 1 vis[i-2] vis i-2 i 2 1000000007 if(vis[n]==-1)
			vis[n]=0; vis[n]==-1 vis[n] vis n -1 1 vis[n]=0 vis[n] vis n 0 System.out.println(vis[n]) System.out.println System.out System System.out vis[n] vis n String [] Args Args public class Main
{
	public static void main(String [] Args)
	{
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int m=in.nextInt();
		long [] vis=new long [n+1];
		vis[0]=1;
		for(int i=0;i<m;i++)
		{
			int k=in.nextInt();
			vis[k]=-1;
		}
		if(vis[1]!=-1)
			vis[1]=1;
		for(int i=2;i<=n;i++)
		{
			if(vis[i]!=-1)
			{
				if(vis[i-1]==-1)
					vis[i]=vis[i-2];
				else if(vis[i-2]==-1)
					vis[i]=vis[i-1];
				else
				    vis[i]=(vis[i-1]+vis[i-2])%1000000007;
			}
		}
		if(vis[n]==-1)
			vis[n]=0;
		System.out.println(vis[n]);
	}
} public class Main
{
	public static void main(String [] Args)
	{
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int m=in.nextInt();
		long [] vis=new long [n+1];
		vis[0]=1;
		for(int i=0;i<m;i++)
		{
			int k=in.nextInt();
			vis[k]=-1;
		}
		if(vis[1]!=-1)
			vis[1]=1;
		for(int i=2;i<=n;i++)
		{
			if(vis[i]!=-1)
			{
				if(vis[i-1]==-1)
					vis[i]=vis[i-2];
				else if(vis[i-2]==-1)
					vis[i]=vis[i-1];
				else
				    vis[i]=(vis[i-1]+vis[i-2])%1000000007;
			}
		}
		if(vis[n]==-1)
			vis[n]=0;
		System.out.println(vis[n]);
	}
} Main
import java.util.*;
import java.io.*;

public class Main
{
	public static void main(String [] Args)
	{
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int m=in.nextInt();
		long [] vis=new long [n+1];
		vis[0]=1;
		for(int i=0;i<m;i++)
		{
			int k=in.nextInt();
			vis[k]=-1;
		}
		if(vis[1]!=-1)
			vis[1]=1;
		for(int i=2;i<=n;i++)
		{
			if(vis[i]!=-1)
			{
				if(vis[i-1]==-1)
					vis[i]=vis[i-2];
				else if(vis[i-2]==-1)
					vis[i]=vis[i-1];
				else
				    vis[i]=(vis[i-1]+vis[i-2])%1000000007;
			}
		}
		if(vis[n]==-1)
			vis[n]=0;
		System.out.println(vis[n]);
	}
}
	