<?php
list($n, $m)=explode(" ", fgets(STDIN));
$broken_stairs =[];
$zero_flag=0;
for($i=0; $i<$m; $i++){
	$broken_stairs[] = trim(fgets(STDIN));
	if($broken_stairs[$i]==0 && $broken_stairs[$i-1]==0){
		$zero_flag =1;
		break;
	}
}

function get_all_ways($n, $broken_stairs){
	$array = [];
	for($i=0; $i<=$n; $i++){
		if(!in_array($i, $broken_stairs)){
			if($i==0 || $i==1){
				$array[]=1;
			}elseif($array[$i-1]==0 && $array[$i-2]==0){
				return 0;
			}else{
				$array[] = $array[$i-1] + $array[$i-2];
			}
		}else{
			$array[] = 0;
		}
	}
	return $array[$n];
}

echo $zero_flag==1 ? 0 . "\n" : get_all_ways($n, $broken_stairs)%1000000007 . "\n";
?>