using System;
using System.Collections.Generic;
using System.Linq;

namespace ABC129
{
	class Program
	{
		static void Main(string[] args)
		{
			var NM = Console.ReadLine().Split(' ').Select(int.Parse).ToList();
			var N = NM[0];
			var M = NM[1];
			var a = ReadLines(M).Select(int.Parse).ToList();
			var ans = Enumerable.Range(1, N).Aggregate(new int[] { 0, 1 }, (p, i) => a.Any(n => n == i) ? new int[] { p[1], 0 } : new int[] { p[1], (p[0] + p[1]) % 1000000007 });
			Console.WriteLine(ans[1]);
		}

		static IEnumerable<string> ReadLines(int n) => Enumerable.Range(0, n).Select(_ => Console.ReadLine());
	}
}
