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

	$route = array(0,1);
	
	for ($i=2; $i<$n+2; $i++) {
	    	if ($break[$i-2] == 1) {
	    	    $route[$i] = 0;
	    	} else {
	            $route[$i] = $route[$i-2] + $route[$i-1];
	    	}
	}

	echo $route[$n+1] % 1000000007;
?>
