my $p = <STDIN>;
my ($n, $m) = split / /, $p;
my @a =(-1);
my $ans = 1;
my $diff;

for (0..$m-1){
    $p = <STDIN>;
    chomp($p);
    push(@a,$p);
}
push(@a,$n+1);

for(0..$#a-1){
    $diff = $a[$_+1] - $a[$_];
#    print "$diff  $a[$_+1]  $a[$_] \n";
    if ($diff>1){
	$ans *= $diff-1-$_ for (1..($diff-2)/2);
	$ans /= $_ for (1..($diff-2)/2);
	$ans %= 1000000007 if $ans > 1000000007;
    }
    else{
	$ans =0;
	break;
    }    
}

$ans = 0 if $a[1] == 0;

print $ans."\n";

1;
