#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> a(m);
  vector<long long> s;
  ;
  for (int i = 0; i < (m - 1); i++) {
    s.push_back(a[i + 1] - a[i] - 1);
  }
  vector<long long> cases(n);
  cases[0] = 0;
  cases[1] = 1;
  cases[2] = 1;
  for (int i = 3; i < n; i++) {
    cases[i] = cases[i - 1] + cases[i - 2];
  }
  long long ans = 1;
  ;
  for (int i = 0; i < (s.size()); i++) ans *= cases[s[i]];
  cout << ans << endl;
}
