#include <bits/stdc++.h>
using namespace std;

int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	int n,m;
	vector<int> oks(n+1,true);
	cin >>n>>m;
	memset(oks,1,sizeof(oks));
	vector <long long> t(n+1);
    t[0]=1;
	for(int i = 0;i<n;++i)
	{    for(int next = i+1;next<=min(n,i+2);++next)
    {
        if(oks[next])
        {
            t[next]+=t[i];
            t[next]%=1000000007;
        }
    }
		
	}
	cout <<t[n]<<endl;

	return 0;
}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 