/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
What do you think? What do you think?
1st on Billboard, what do you think of it
Next is a Grammy, what do you think of it
However you think, I’m sorry, but shit, I have no fucking interest
*******************************
Higher, higher, even higher, to the point you won’t even be able to see me
https://www.a2oj.com/Ladder16.html
*******************************
NEVER DO 300IQ CONTESTS EVER
300IQ AS WRITER = EXTRA NONO
*/
import java.util.*;
import java.io.*;
import java.math.*;

   public class Main
   {
      static long MOD = 1000000007L;
      public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int M = Integer.parseInt(st.nextToken());
         int[] arr = new int[M];
         for(int i=0; i < M; i++)
            arr[i] = Integer.parseInt(infile.readLine());
         HashSet<Integer> set = new HashSet<Integer>();
         for(int x: arr)
            set.add(x);
         long[] dp = new long[N+1];
         dp[0] = 1L;
         for(int i=1; i <= N; i++)
         {
            long sum = dp[i-1];
            if(i >= 2)
               sum += dp[i-2];
            sum %= MOD;
            dp[i] = sum;
            if(set.contains(i))
               dp[i] = 0L;
         }
         System.out.println(dp[N]);
      }
   } import java.util.*; util.* java import java.io.*; io.* java import java.math.*; math.* java public class Main
   {
      static long MOD = 1000000007L;
      public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int M = Integer.parseInt(st.nextToken());
         int[] arr = new int[M];
         for(int i=0; i < M; i++)
            arr[i] = Integer.parseInt(infile.readLine());
         HashSet<Integer> set = new HashSet<Integer>();
         for(int x: arr)
            set.add(x);
         long[] dp = new long[N+1];
         dp[0] = 1L;
         for(int i=1; i <= N; i++)
         {
            long sum = dp[i-1];
            if(i >= 2)
               sum += dp[i-2];
            sum %= MOD;
            dp[i] = sum;
            if(set.contains(i))
               dp[i] = 0L;
         }
         System.out.println(dp[N]);
      }
   } Main static long MOD = 1000000007L; MOD 1000000007L public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int M = Integer.parseInt(st.nextToken());
         int[] arr = new int[M];
         for(int i=0; i < M; i++)
            arr[i] = Integer.parseInt(infile.readLine());
         HashSet<Integer> set = new HashSet<Integer>();
         for(int x: arr)
            set.add(x);
         long[] dp = new long[N+1];
         dp[0] = 1L;
         for(int i=1; i <= N; i++)
         {
            long sum = dp[i-1];
            if(i >= 2)
               sum += dp[i-2];
            sum %= MOD;
            dp[i] = sum;
            if(set.contains(i))
               dp[i] = 0L;
         }
         System.out.println(dp[N]);
      } main {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int M = Integer.parseInt(st.nextToken());
         int[] arr = new int[M];
         for(int i=0; i < M; i++)
            arr[i] = Integer.parseInt(infile.readLine());
         HashSet<Integer> set = new HashSet<Integer>();
         for(int x: arr)
            set.add(x);
         long[] dp = new long[N+1];
         dp[0] = 1L;
         for(int i=1; i <= N; i++)
         {
            long sum = dp[i-1];
            if(i >= 2)
               sum += dp[i-2];
            sum %= MOD;
            dp[i] = sum;
            if(set.contains(i))
               dp[i] = 0L;
         }
         System.out.println(dp[N]);
      } BufferedReader infile = new BufferedReader(new InputStreamReader(System.in)); infile new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st = new StringTokenizer(infile.readLine()); st new StringTokenizer(infile.readLine()) int N = Integer.parseInt(st.nextToken()); N Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int M = Integer.parseInt(st.nextToken()); M Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int[] arr = new int[M]; arr new int[M] M for(int i=0; i < M; i++)
            arr[i] = Integer.parseInt(infile.readLine()); int i=0; int i=0; i 0 i < M i M i++ i++ i arr[i] = Integer.parseInt(infile.readLine()); arr[i] = Integer.parseInt(infile.readLine()) arr[i] arr i Integer.parseInt(infile.readLine()) Integer.parseInt Integer infile.readLine() infile.readLine infile HashSet<Integer> set = new HashSet<Integer>(); set new HashSet<Integer>() for(int x: arr)
            set.add(x); int x arr set.add(x); set.add(x) set.add set x long[] dp = new long[N+1]; dp new long[N+1] N+1 N 1 dp[0] = 1L dp[0] dp 0 1L for(int i=1; i <= N; i++)
         {
            long sum = dp[i-1];
            if(i >= 2)
               sum += dp[i-2];
            sum %= MOD;
            dp[i] = sum;
            if(set.contains(i))
               dp[i] = 0L;
         } int i=1; int i=1; i 1 i <= N i N i++ i++ i {
            long sum = dp[i-1];
            if(i >= 2)
               sum += dp[i-2];
            sum %= MOD;
            dp[i] = sum;
            if(set.contains(i))
               dp[i] = 0L;
         } {
            long sum = dp[i-1];
            if(i >= 2)
               sum += dp[i-2];
            sum %= MOD;
            dp[i] = sum;
            if(set.contains(i))
               dp[i] = 0L;
         } long sum = dp[i-1]; sum dp[i-1] dp i-1 i 1 if(i >= 2)
               sum += dp[i-2]; i >= 2 i 2 sum += dp[i-2] sum dp[i-2] dp i-2 i 2 sum %= MOD sum MOD dp[i] = sum dp[i] dp i sum if(set.contains(i))
               dp[i] = 0L; set.contains(i) set.contains set i dp[i] = 0L dp[i] dp i 0L System.out.println(dp[N]) System.out.println System.out System System.out dp[N] dp N String omkar[] omkar public class Main
   {
      static long MOD = 1000000007L;
      public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int M = Integer.parseInt(st.nextToken());
         int[] arr = new int[M];
         for(int i=0; i < M; i++)
            arr[i] = Integer.parseInt(infile.readLine());
         HashSet<Integer> set = new HashSet<Integer>();
         for(int x: arr)
            set.add(x);
         long[] dp = new long[N+1];
         dp[0] = 1L;
         for(int i=1; i <= N; i++)
         {
            long sum = dp[i-1];
            if(i >= 2)
               sum += dp[i-2];
            sum %= MOD;
            dp[i] = sum;
            if(set.contains(i))
               dp[i] = 0L;
         }
         System.out.println(dp[N]);
      }
   } public class Main
   {
      static long MOD = 1000000007L;
      public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int M = Integer.parseInt(st.nextToken());
         int[] arr = new int[M];
         for(int i=0; i < M; i++)
            arr[i] = Integer.parseInt(infile.readLine());
         HashSet<Integer> set = new HashSet<Integer>();
         for(int x: arr)
            set.add(x);
         long[] dp = new long[N+1];
         dp[0] = 1L;
         for(int i=1; i <= N; i++)
         {
            long sum = dp[i-1];
            if(i >= 2)
               sum += dp[i-2];
            sum %= MOD;
            dp[i] = sum;
            if(set.contains(i))
               dp[i] = 0L;
         }
         System.out.println(dp[N]);
      }
   } Main
/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
What do you think? What do you think?
1st on Billboard, what do you think of it
Next is a Grammy, what do you think of it
However you think, I’m sorry, but shit, I have no fucking interest
*******************************
Higher, higher, even higher, to the point you won’t even be able to see me
https://www.a2oj.com/Ladder16.html
*******************************
NEVER DO 300IQ CONTESTS EVER
300IQ AS WRITER = EXTRA NONO
*/
import java.util.*;
import java.io.*;
import java.math.*;

   public class Main
   {
      static long MOD = 1000000007L;
      public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int M = Integer.parseInt(st.nextToken());
         int[] arr = new int[M];
         for(int i=0; i < M; i++)
            arr[i] = Integer.parseInt(infile.readLine());
         HashSet<Integer> set = new HashSet<Integer>();
         for(int x: arr)
            set.add(x);
         long[] dp = new long[N+1];
         dp[0] = 1L;
         for(int i=1; i <= N; i++)
         {
            long sum = dp[i-1];
            if(i >= 2)
               sum += dp[i-2];
            sum %= MOD;
            dp[i] = sum;
            if(set.contains(i))
               dp[i] = 0L;
         }
         System.out.println(dp[N]);
      }
   }