Problem:
Score : 300 points

Problem Statement

There is a staircase with N steps. Takahashi is now standing at the foot of the stairs, that is, on the 0-th step.
He can climb up one or two steps at a time.

However, the treads of the a_1-th, a_2-th, a_3-th, \ldots, a_M-th steps are broken, so it is dangerous to set foot on those steps.

How many are there to climb up to the top step, that is, the N-th step, without setting foot on the broken steps?
Find the count modulo 1\ 000\ 000\ 007.

Constraints

1 \leq N \leq 10^5

0 \leq M \leq N-1

1 \leq a_1 < a_2 < ... < a_M \leq N-1

Input

Input is given from Standard Input in the following format:

N M
a_1
a_2
.
.
.
a_M

Output

Print the number of ways to climb up the stairs under the condition, modulo 1\ 000\ 000\ 007.

Sample Input 1

6 1
3

Sample Output 1

4

There are four ways to climb up the stairs, as follows:

0 \to 1 \to 2 \to 4 \to 5 \to 6

0 \to 1 \to 2 \to 4 \to 6

0 \to 2 \to 4 \to 5 \to 6

0 \to 2 \to 4 \to 6

Sample Input 2

10 2
4
5

Sample Output 2

0

There may be no way to climb up the stairs without setting foot on the broken steps.

Sample Input 3

100 5
1
23
45
67
89

Sample Output 3

608200469

Be sure to print the count modulo 1\ 000\ 000\ 007.

Solution in C++14 (GCC 5.4.1) (judge verdict: Accepted)

// BUGSBUNNY
// IIT ROORKEE
//                               _,add8ba,
//                             ,d888888888b,
//                            d8888888888888b                        _,ad8ba,_
//                           d888888888888888)                     ,d888888888b,
//                           I8888888888888888 _________          ,8888888888888b
//                 __________`Y88888888888888P"""""""""""baaa,__ ,888888888888888,
//             ,adP"""""""""""9888888888P""^                 ^""Y8888888888888888I
//          ,a8"^           ,d888P"888P^                           ^"Y8888888888P'
//        ,a8^            ,d8888'                                     ^Y8888888P'
//       a88'           ,d8888P'                                        I88P"^
//     ,d88'           d88888P'                                          "b,
//    ,d88'           d888888'                                            `b,
//   ,d88'           d888888I                                              `b,
//   d88I           ,8888888'            ___                                `b,
//  ,888'           d8888888          ,d88888b,              ____            `b,
//  d888           ,8888888I         d88888888b,           ,d8888b,           `b
// ,8888           I8888888I        d8888888888I          ,88888888b           8,
// I8888           88888888b       d88888888888'          8888888888b          8I
// d8886           888888888       Y888888888P'           Y8888888888,        ,8b
// 88888b          I88888888b      `Y8888888^             `Y888888888I        d88,
// Y88888b         `888888888b,      `""""^                `Y8888888P'       d888I
// `888888b         88888888888b,                           `Y8888P^        d88888
//  Y888888b       ,8888888888888ba,_          _______        `""^        ,d888888
//  I8888888b,    ,888888888888888888ba,_     d88888888b               ,ad8888888I
//  `888888888b,  I8888888888888888888888b,    ^"Y888P"^      ____.,ad88888888888I
//   88888888888b,`888888888888888888888888b,     ""      ad888888888888888888888'
//   8888888888888698888888888888888888888888b_,ad88ba,_,d88888888888888888888888
//   88888888888888888888888888888888888888888b,`"""^ d8888888888888888888888888I
//   8888888888888888888888888888888888888888888baaad888888888888888888888888888'
//   Y8888888888888888888888888888888888888888888888888888888888888888888888888P
//   I888888888888888888888888888888888888888888888P^  ^Y8888888888888888888888'
//   `Y88888888888888888P88888888888888888888888888'     ^88888888888888888888I
//    `Y8888888888888888 `8888888888888888888888888       8888888888888888888P'
//     `Y888888888888888  `888888888888888888888888,     ,888888888888888888P'
//      `Y88888888888888b  `88888888888888888888888I     I888888888888888888'
//        "Y8888888888888b  `8888888888888888888888I     I88888888888888888'
//          "Y88888888888P   `888888888888888888888b     d8888888888888888'
//             ^""""""""^     `Y88888888888888888888,    888888888888888P'
//                              "8888888888888888888b,   Y888888888888P^
//                               `Y888888888888888888b   `Y8888888P"^
//                                 "Y8888888888888888P     `""""^
//                                   `"YY88888888888P'
//                                        ^""""""""'
#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); 
#define int long long
#define ll long long
#define ld long double
#define endl '\n'
#define vi vector<int>
#define vvi vector<vi>
#define vs vector<string>
#define vl vector<long long>
#define vpii vector<pii>
#define vpipii vector<pipii>
#define vb vector<bool>
#define pb push_back
#define pob pop_back
#define gcd __gcd
#define mp make_pair
#define pii pair<int,int>
#define pipii pair<int,pii>
#define pll pair<long long,long long>
#define pld pair<long double,long double>
#define mod 1000000007 
#define mod2 998244353
#define rep(i,n) for (ll i = 0; i < n; i++)
#define repp(i,a,b) for(ll i = a ; i<b ; i++)
#define reppr(i,a,b) for(ll i = a-1 ; i>=b ; i--)
#define repr(i,n) for (ll i = n - 1; i >= 0; i--)
#define ff first
#define ss second
#define pc putchar_unlocked
#define gc getchar_unlocked
#define inf 1000000000000
#define infn -9223372036854775807
#define pi 3.14159265358979323846
#define eps 0.0000000001
#define sp << " " << 
#define len(s) s.size()
#define setprecision0 cout << fixed << setprecision(0);
#define setprecision10 cout << fixed << setprecision(10);
#define all(n) n.begin(),n.end()
#define SORT(v) sort(all(v))

void solve();

signed main()
{
    fast;
          
    int t = 1;
    // cin >> t;
    while(t--)
        solve();
}
void solve()
{
    int n , m , temp;
    cin >> n >> m; 
    bool nok[n+1] = {};
    int ans[n] = {};
    rep(i,m)
        cin >> temp , nok[temp-1] = 1;
    rep(i,n)
    {
        if(i==0 && nok[0])
            ans[i] = 0;
        else if(i==0)
            ans[i] = 1;
        else if(i==1 && nok[i])
            ans[i] = 0;
        else if(i==1)
            ans[i] = 1+ans[0];
        else if(nok[i])
            ans[i] = 0;
        else
            ans[i] = (ans[i-1] + ans[i-2])%mod ;
    }
    cout << ans[n-1] << endl;
}