import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int number_n, number_m, i, j = 0;
    number_n = Integer.parseInt(sc.next());
    number_m = Integer.parseInt(sc.next());
    int[] stage = new int[number_n+1];
    int[] broken_stage = new int[number_m+1];
    broken_stage[0] = 0;
    for(i = 0; i < number_m; i++) {
      broken_stage[i] = Integer.parseInt(sc.next());
    }
    stage[0] = 1;
    stage[1] = (broken_stage[0] == 1)? 0 : 1;
    for(i = 2; i <= number_n; i++) {
      stage[i] = (stage[i-1] + stage[i-2]);
      for(; j < number_m; j++) {
        if(broken_stage[j] < i) {
          continue;
        } else if(broken_stage[j] > i) {
          break;
        } else {
          stage[i] = 0;
          break;
        }
      }
      if(stage[i] > 1000000007) stage[i] -= 1000000007;
    }
    System.out.println(stage[number_n]);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int number_n, number_m, i, j = 0;
    number_n = Integer.parseInt(sc.next());
    number_m = Integer.parseInt(sc.next());
    int[] stage = new int[number_n+1];
    int[] broken_stage = new int[number_m+1];
    broken_stage[0] = 0;
    for(i = 0; i < number_m; i++) {
      broken_stage[i] = Integer.parseInt(sc.next());
    }
    stage[0] = 1;
    stage[1] = (broken_stage[0] == 1)? 0 : 1;
    for(i = 2; i <= number_n; i++) {
      stage[i] = (stage[i-1] + stage[i-2]);
      for(; j < number_m; j++) {
        if(broken_stage[j] < i) {
          continue;
        } else if(broken_stage[j] > i) {
          break;
        } else {
          stage[i] = 0;
          break;
        }
      }
      if(stage[i] > 1000000007) stage[i] -= 1000000007;
    }
    System.out.println(stage[number_n]);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int number_n, number_m, i, j = 0;
    number_n = Integer.parseInt(sc.next());
    number_m = Integer.parseInt(sc.next());
    int[] stage = new int[number_n+1];
    int[] broken_stage = new int[number_m+1];
    broken_stage[0] = 0;
    for(i = 0; i < number_m; i++) {
      broken_stage[i] = Integer.parseInt(sc.next());
    }
    stage[0] = 1;
    stage[1] = (broken_stage[0] == 1)? 0 : 1;
    for(i = 2; i <= number_n; i++) {
      stage[i] = (stage[i-1] + stage[i-2]);
      for(; j < number_m; j++) {
        if(broken_stage[j] < i) {
          continue;
        } else if(broken_stage[j] > i) {
          break;
        } else {
          stage[i] = 0;
          break;
        }
      }
      if(stage[i] > 1000000007) stage[i] -= 1000000007;
    }
    System.out.println(stage[number_n]);
  } main {
    Scanner sc = new Scanner(System.in);
    int number_n, number_m, i, j = 0;
    number_n = Integer.parseInt(sc.next());
    number_m = Integer.parseInt(sc.next());
    int[] stage = new int[number_n+1];
    int[] broken_stage = new int[number_m+1];
    broken_stage[0] = 0;
    for(i = 0; i < number_m; i++) {
      broken_stage[i] = Integer.parseInt(sc.next());
    }
    stage[0] = 1;
    stage[1] = (broken_stage[0] == 1)? 0 : 1;
    for(i = 2; i <= number_n; i++) {
      stage[i] = (stage[i-1] + stage[i-2]);
      for(; j < number_m; j++) {
        if(broken_stage[j] < i) {
          continue;
        } else if(broken_stage[j] > i) {
          break;
        } else {
          stage[i] = 0;
          break;
        }
      }
      if(stage[i] > 1000000007) stage[i] -= 1000000007;
    }
    System.out.println(stage[number_n]);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int number_n number_n number_m number_m i i j = 0; j 0 number_n = Integer.parseInt(sc.next()) number_n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc number_m = Integer.parseInt(sc.next()) number_m Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] stage = new int[number_n+1]; stage new int[number_n+1] number_n+1 number_n 1 int[] broken_stage = new int[number_m+1]; broken_stage new int[number_m+1] number_m+1 number_m 1 broken_stage[0] = 0 broken_stage[0] broken_stage 0 0 for(i = 0; i < number_m; i++) {
      broken_stage[i] = Integer.parseInt(sc.next());
    } i = 0; i = 0 i 0 i < number_m i number_m i++ i++ i {
      broken_stage[i] = Integer.parseInt(sc.next());
    } {
      broken_stage[i] = Integer.parseInt(sc.next());
    } broken_stage[i] = Integer.parseInt(sc.next()) broken_stage[i] broken_stage i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc stage[0] = 1 stage[0] stage 0 1 stage[1] = (broken_stage[0] == 1)? 0 : 1 stage[1] stage 1 (broken_stage[0] == 1)? 0 : 1 (broken_stage[0] == 1) broken_stage[0] broken_stage 0 1 0 1 for(i = 2; i <= number_n; i++) {
      stage[i] = (stage[i-1] + stage[i-2]);
      for(; j < number_m; j++) {
        if(broken_stage[j] < i) {
          continue;
        } else if(broken_stage[j] > i) {
          break;
        } else {
          stage[i] = 0;
          break;
        }
      }
      if(stage[i] > 1000000007) stage[i] -= 1000000007;
    } i = 2; i = 2 i 2 i <= number_n i number_n i++ i++ i {
      stage[i] = (stage[i-1] + stage[i-2]);
      for(; j < number_m; j++) {
        if(broken_stage[j] < i) {
          continue;
        } else if(broken_stage[j] > i) {
          break;
        } else {
          stage[i] = 0;
          break;
        }
      }
      if(stage[i] > 1000000007) stage[i] -= 1000000007;
    } {
      stage[i] = (stage[i-1] + stage[i-2]);
      for(; j < number_m; j++) {
        if(broken_stage[j] < i) {
          continue;
        } else if(broken_stage[j] > i) {
          break;
        } else {
          stage[i] = 0;
          break;
        }
      }
      if(stage[i] > 1000000007) stage[i] -= 1000000007;
    } stage[i] = (stage[i-1] + stage[i-2]) stage[i] stage i (stage[i-1] + stage[i-2]) stage[i-1] stage i-1 i 1 stage[i-2] stage i-2 i 2 for(; j < number_m; j++) {
        if(broken_stage[j] < i) {
          continue;
        } else if(broken_stage[j] > i) {
          break;
        } else {
          stage[i] = 0;
          break;
        }
      } ; j < number_m j number_m j++ j++ j {
        if(broken_stage[j] < i) {
          continue;
        } else if(broken_stage[j] > i) {
          break;
        } else {
          stage[i] = 0;
          break;
        }
      } {
        if(broken_stage[j] < i) {
          continue;
        } else if(broken_stage[j] > i) {
          break;
        } else {
          stage[i] = 0;
          break;
        }
      } if(broken_stage[j] < i) {
          continue;
        } else if(broken_stage[j] > i) {
          break;
        } else {
          stage[i] = 0;
          break;
        } broken_stage[j] < i broken_stage[j] broken_stage j i {
          continue;
        } continue; if(broken_stage[j] > i) {
          break;
        } else {
          stage[i] = 0;
          break;
        } broken_stage[j] > i broken_stage[j] broken_stage j i {
          break;
        } break; {
          stage[i] = 0;
          break;
        } stage[i] = 0 stage[i] stage i 0 break; if(stage[i] > 1000000007) stage[i] -= 1000000007; stage[i] > 1000000007 stage[i] stage i 1000000007 stage[i] -= 1000000007 stage[i] stage i 1000000007 System.out.println(stage[number_n]) System.out.println System.out System System.out stage[number_n] stage number_n String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int number_n, number_m, i, j = 0;
    number_n = Integer.parseInt(sc.next());
    number_m = Integer.parseInt(sc.next());
    int[] stage = new int[number_n+1];
    int[] broken_stage = new int[number_m+1];
    broken_stage[0] = 0;
    for(i = 0; i < number_m; i++) {
      broken_stage[i] = Integer.parseInt(sc.next());
    }
    stage[0] = 1;
    stage[1] = (broken_stage[0] == 1)? 0 : 1;
    for(i = 2; i <= number_n; i++) {
      stage[i] = (stage[i-1] + stage[i-2]);
      for(; j < number_m; j++) {
        if(broken_stage[j] < i) {
          continue;
        } else if(broken_stage[j] > i) {
          break;
        } else {
          stage[i] = 0;
          break;
        }
      }
      if(stage[i] > 1000000007) stage[i] -= 1000000007;
    }
    System.out.println(stage[number_n]);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int number_n, number_m, i, j = 0;
    number_n = Integer.parseInt(sc.next());
    number_m = Integer.parseInt(sc.next());
    int[] stage = new int[number_n+1];
    int[] broken_stage = new int[number_m+1];
    broken_stage[0] = 0;
    for(i = 0; i < number_m; i++) {
      broken_stage[i] = Integer.parseInt(sc.next());
    }
    stage[0] = 1;
    stage[1] = (broken_stage[0] == 1)? 0 : 1;
    for(i = 2; i <= number_n; i++) {
      stage[i] = (stage[i-1] + stage[i-2]);
      for(; j < number_m; j++) {
        if(broken_stage[j] < i) {
          continue;
        } else if(broken_stage[j] > i) {
          break;
        } else {
          stage[i] = 0;
          break;
        }
      }
      if(stage[i] > 1000000007) stage[i] -= 1000000007;
    }
    System.out.println(stage[number_n]);
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int number_n, number_m, i, j = 0;
    number_n = Integer.parseInt(sc.next());
    number_m = Integer.parseInt(sc.next());
    int[] stage = new int[number_n+1];
    int[] broken_stage = new int[number_m+1];
    broken_stage[0] = 0;
    for(i = 0; i < number_m; i++) {
      broken_stage[i] = Integer.parseInt(sc.next());
    }
    stage[0] = 1;
    stage[1] = (broken_stage[0] == 1)? 0 : 1;
    for(i = 2; i <= number_n; i++) {
      stage[i] = (stage[i-1] + stage[i-2]);
      for(; j < number_m; j++) {
        if(broken_stage[j] < i) {
          continue;
        } else if(broken_stage[j] > i) {
          break;
        } else {
          stage[i] = 0;
          break;
        }
      }
      if(stage[i] > 1000000007) stage[i] -= 1000000007;
    }
    System.out.println(stage[number_n]);
  }
}
