using System; 
using System.Text; 
using System.Collections.Generic;
using System.Linq; 
using E = System.Linq.Enumerable; 

class Program { 
     static int[] stairs;
     static void Main(string[] args) {
     //入力を受け取る 
     int[] NM = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
     int N =　NM[0];
     int M =　NM[1];
     stairs = new int[N+1];
     
     stairs[0] = 1;
     stairs[1] = 1;
     
     for(int i = 2; i < N+1 ;i++){
          stairs[i] = -1;
     }
      
     for(int i = 1; i < M+1 ;i++){
          var num = int.Parse(Console.ReadLine());
          stairs[num] = 0;
     } 
      Console.WriteLine(CountWay(N)); }
      
     static int CountWay(int dan){
         if(stairs[dan] != -1){
             return stairs[dan];
         }else{
             stairs[dan] = CountWay(dan-1)+CountWay(dan-2);
             return stairs[dan];
         }
     }
     }
