using System;
using System.Collections.Generic;

namespace C___Typical_Stairs
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] input = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
            int n = input[0];
            int m = input[1];
            List<int> broken = new List<int>();

            for(int j = 0; j < m; j++)
            {
                broken[j] = int.Parse(Console.ReadLine());
            }

            List<int> dp = new List<int>();

            dp[0] = 0;
            dp[1] = 1;

            for(int i = 2; i < n; i++)
            {
                dp[i] = dp[i - 2] + dp[i - 1];

                for(int k = 0; k < m; k++)
                {
                    if(dp[i] == broken[k])
                    {
                        dp[i] = 0;
                    }
                }
            }

            Console.WriteLine(dp[n - 1]);

        }
    }
}
