import java.util.*;
import java.lang.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        if(m==0){
            m=1;
        }
        int[] array = new int[m];
        for(int i=0;i<m;i++){
            try{
                array[i] = Integer.parseInt(sc.next());
            }catch(NoSuchElementException e){
                array[0] = -1;
            }
        }
        sc.close();
        int curstep = 0;
        int[] step = new int[n+1];
        step[0] = 1;
        if(array[0]==1){
            step[1] = 0;
            curstep++;
        }else{
            step[1] = 1;
        }
        int big = (int)Math.pow(10,9)+7;
        for(int i=2;i<n+1;i++){
            if(curstep < m && array[curstep] == i){
                step[i] = 0;
                curstep++;
            }else{
                step[i] = step[i-1] + step[i-2];
                if(step[i] > big){
                    step[i] -= big;
                }
            }
        }
        System.out.println(step[n]);
    }
} import java.util.*; util.* java import java.lang.*; lang.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        if(m==0){
            m=1;
        }
        int[] array = new int[m];
        for(int i=0;i<m;i++){
            try{
                array[i] = Integer.parseInt(sc.next());
            }catch(NoSuchElementException e){
                array[0] = -1;
            }
        }
        sc.close();
        int curstep = 0;
        int[] step = new int[n+1];
        step[0] = 1;
        if(array[0]==1){
            step[1] = 0;
            curstep++;
        }else{
            step[1] = 1;
        }
        int big = (int)Math.pow(10,9)+7;
        for(int i=2;i<n+1;i++){
            if(curstep < m && array[curstep] == i){
                step[i] = 0;
                curstep++;
            }else{
                step[i] = step[i-1] + step[i-2];
                if(step[i] > big){
                    step[i] -= big;
                }
            }
        }
        System.out.println(step[n]);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        if(m==0){
            m=1;
        }
        int[] array = new int[m];
        for(int i=0;i<m;i++){
            try{
                array[i] = Integer.parseInt(sc.next());
            }catch(NoSuchElementException e){
                array[0] = -1;
            }
        }
        sc.close();
        int curstep = 0;
        int[] step = new int[n+1];
        step[0] = 1;
        if(array[0]==1){
            step[1] = 0;
            curstep++;
        }else{
            step[1] = 1;
        }
        int big = (int)Math.pow(10,9)+7;
        for(int i=2;i<n+1;i++){
            if(curstep < m && array[curstep] == i){
                step[i] = 0;
                curstep++;
            }else{
                step[i] = step[i-1] + step[i-2];
                if(step[i] > big){
                    step[i] -= big;
                }
            }
        }
        System.out.println(step[n]);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        if(m==0){
            m=1;
        }
        int[] array = new int[m];
        for(int i=0;i<m;i++){
            try{
                array[i] = Integer.parseInt(sc.next());
            }catch(NoSuchElementException e){
                array[0] = -1;
            }
        }
        sc.close();
        int curstep = 0;
        int[] step = new int[n+1];
        step[0] = 1;
        if(array[0]==1){
            step[1] = 0;
            curstep++;
        }else{
            step[1] = 1;
        }
        int big = (int)Math.pow(10,9)+7;
        for(int i=2;i<n+1;i++){
            if(curstep < m && array[curstep] == i){
                step[i] = 0;
                curstep++;
            }else{
                step[i] = step[i-1] + step[i-2];
                if(step[i] > big){
                    step[i] -= big;
                }
            }
        }
        System.out.println(step[n]);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int m = Integer.parseInt(sc.next()); m Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if(m==0){
            m=1;
        } m==0 m 0 {
            m=1;
        } m=1 m 1 int[] array = new int[m]; array new int[m] m for(int i=0;i<m;i++){
            try{
                array[i] = Integer.parseInt(sc.next());
            }catch(NoSuchElementException e){
                array[0] = -1;
            }
        } int i=0; int i=0; i 0 i<m i m i++ i++ i {
            try{
                array[i] = Integer.parseInt(sc.next());
            }catch(NoSuchElementException e){
                array[0] = -1;
            }
        } {
            try{
                array[i] = Integer.parseInt(sc.next());
            }catch(NoSuchElementException e){
                array[0] = -1;
            }
        } try{
                array[i] = Integer.parseInt(sc.next());
            }catch(NoSuchElementException e){
                array[0] = -1;
            } catch(NoSuchElementException e){
                array[0] = -1;
            } NoSuchElementException e {
                array[0] = -1;
            } array[0] = -1 array[0] array 0 -1 1 {
                array[i] = Integer.parseInt(sc.next());
            } array[i] = Integer.parseInt(sc.next()) array[i] array i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc sc.close() sc.close sc int curstep = 0; curstep 0 int[] step = new int[n+1]; step new int[n+1] n+1 n 1 step[0] = 1 step[0] step 0 1 if(array[0]==1){
            step[1] = 0;
            curstep++;
        }else{
            step[1] = 1;
        } array[0]==1 array[0] array 0 1 {
            step[1] = 0;
            curstep++;
        } step[1] = 0 step[1] step 1 0 curstep++ curstep {
            step[1] = 1;
        } step[1] = 1 step[1] step 1 1 int big = (int)Math.pow(10,9)+7; big (int)Math.pow(10,9)+7 (int)Math.pow(10,9) Math.pow Math 10 9 7 for(int i=2;i<n+1;i++){
            if(curstep < m && array[curstep] == i){
                step[i] = 0;
                curstep++;
            }else{
                step[i] = step[i-1] + step[i-2];
                if(step[i] > big){
                    step[i] -= big;
                }
            }
        } int i=2; int i=2; i 2 i<n+1 i n+1 n 1 i++ i++ i {
            if(curstep < m && array[curstep] == i){
                step[i] = 0;
                curstep++;
            }else{
                step[i] = step[i-1] + step[i-2];
                if(step[i] > big){
                    step[i] -= big;
                }
            }
        } {
            if(curstep < m && array[curstep] == i){
                step[i] = 0;
                curstep++;
            }else{
                step[i] = step[i-1] + step[i-2];
                if(step[i] > big){
                    step[i] -= big;
                }
            }
        } if(curstep < m && array[curstep] == i){
                step[i] = 0;
                curstep++;
            }else{
                step[i] = step[i-1] + step[i-2];
                if(step[i] > big){
                    step[i] -= big;
                }
            } curstep < m && array[curstep] == i curstep < m curstep m array[curstep] == i array[curstep] array curstep i {
                step[i] = 0;
                curstep++;
            } step[i] = 0 step[i] step i 0 curstep++ curstep {
                step[i] = step[i-1] + step[i-2];
                if(step[i] > big){
                    step[i] -= big;
                }
            } step[i] = step[i-1] + step[i-2] step[i] step i step[i-1] + step[i-2] step[i-1] step i-1 i 1 step[i-2] step i-2 i 2 if(step[i] > big){
                    step[i] -= big;
                } step[i] > big step[i] step i big {
                    step[i] -= big;
                } step[i] -= big step[i] step i big System.out.println(step[n]) System.out.println System.out System System.out step[n] step n String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        if(m==0){
            m=1;
        }
        int[] array = new int[m];
        for(int i=0;i<m;i++){
            try{
                array[i] = Integer.parseInt(sc.next());
            }catch(NoSuchElementException e){
                array[0] = -1;
            }
        }
        sc.close();
        int curstep = 0;
        int[] step = new int[n+1];
        step[0] = 1;
        if(array[0]==1){
            step[1] = 0;
            curstep++;
        }else{
            step[1] = 1;
        }
        int big = (int)Math.pow(10,9)+7;
        for(int i=2;i<n+1;i++){
            if(curstep < m && array[curstep] == i){
                step[i] = 0;
                curstep++;
            }else{
                step[i] = step[i-1] + step[i-2];
                if(step[i] > big){
                    step[i] -= big;
                }
            }
        }
        System.out.println(step[n]);
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        if(m==0){
            m=1;
        }
        int[] array = new int[m];
        for(int i=0;i<m;i++){
            try{
                array[i] = Integer.parseInt(sc.next());
            }catch(NoSuchElementException e){
                array[0] = -1;
            }
        }
        sc.close();
        int curstep = 0;
        int[] step = new int[n+1];
        step[0] = 1;
        if(array[0]==1){
            step[1] = 0;
            curstep++;
        }else{
            step[1] = 1;
        }
        int big = (int)Math.pow(10,9)+7;
        for(int i=2;i<n+1;i++){
            if(curstep < m && array[curstep] == i){
                step[i] = 0;
                curstep++;
            }else{
                step[i] = step[i-1] + step[i-2];
                if(step[i] > big){
                    step[i] -= big;
                }
            }
        }
        System.out.println(step[n]);
    }
} Main
import java.util.*;
import java.lang.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        if(m==0){
            m=1;
        }
        int[] array = new int[m];
        for(int i=0;i<m;i++){
            try{
                array[i] = Integer.parseInt(sc.next());
            }catch(NoSuchElementException e){
                array[0] = -1;
            }
        }
        sc.close();
        int curstep = 0;
        int[] step = new int[n+1];
        step[0] = 1;
        if(array[0]==1){
            step[1] = 0;
            curstep++;
        }else{
            step[1] = 1;
        }
        int big = (int)Math.pow(10,9)+7;
        for(int i=2;i<n+1;i++){
            if(curstep < m && array[curstep] == i){
                step[i] = 0;
                curstep++;
            }else{
                step[i] = step[i-1] + step[i-2];
                if(step[i] > big){
                    step[i] -= big;
                }
            }
        }
        System.out.println(step[n]);
    }
}