#include <bits/stdc++.h>
using namespace std;
int MOD = 1e9 + 7;
int main() {
  int n, m;
  cin >> n >> m;
  int dp[n + 5];
  for (int i = 0; i <= n; i++) {
    dp[i] = 1;
  }
  int temp;
  for (int i = 0; i < m; i++) {
    cin >> temp;
    dp[temp] = 0;
  }
  for (int i = 2; i <= n; i++) {
    if (dp[i] != 0) {
      dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
    }
  }
  cout << dp[n] << endl;
  for (int i = 1; i <= n; i++) {
    cout << i << ")" << dp[i] << " ";
  }
  return 0;
}
