function Main(s) {
  var s = s.split("\n");
  var nm = s[0].split(" ").map(e => e*1);
  var a = s.slice(1, s.length).map(e => e*1);
  var dp = new Array(nm[0] + 1).fill(0);
  dp[0] = 1;

  for(var i = 1; i <= nm[0]; i++) {
    if(i === a[0]) {
      a.shift();
      continue;
    } else {
      if (i === 1) {
        dp[i] = dp[0];
      } else {
        dp[i] = (dp[i - 2] + dp[i - 1]) % 1000000007;
      }
    }
  }
  console.log(dp[dp.length-1]);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));