chomp (my ($n, $m) = split / /, <STDIN>);
my @a;
for my $i (1..$m) {
  chomp (my $in = <STDIN>);
  $a[$i] = $in;
}
push @a, $n;
my @b;
for my $i (1..$m+1) {
  push @b, $a[$i] - $a[$i - 1];
}
my @memo;
$memo[1] = 1;
$memo[2] = 1;
for my $i (3..$n) {
  $memo[$i] = $memo[$i - 1] + $memo[$i - 2];
  $memo[$i] %= 1e9 + 7;
}
my $ans = 1;
for my $i (@b) {
  $ans *= $memo[$i];
  $ans %= 1e9 + 7;
}
print "$ans\n";