import java.util.Scanner;

/**
 * @author yoshizaki
 * abc 129
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        int step = scanner.nextInt();
        int ng = scanner.nextInt();
        long [] dp = new long[step];
        for(int i = 0; i < step; i++) dp[i] = 0;
        if (ng > 0) {
            int [] breaks = new int[step];
            for(int i = 0; i < ng ; i++) breaks[i] = scanner.nextInt();
            for(int i = 0; i < ng; i++) dp[breaks[i]-1] = -100000000000000000l;
        }
        
        if(step > 1) {
            if (dp[0] == 0 && dp[1] == 0) {
                dp[0] = 1;
                dp[1] = 2;
            } else if (dp[0] == 0) {
                dp[0] = 1;
            } else if (dp[1] == 0) {
                dp[1] = 1;
            }
            for(int i = 2; i < step; i++) {
                if (dp[i] < 0) continue;
                if (dp[i-1] > 0) dp[i] += dp[i-1];
                if (dp[i-2] > 0) dp[i] += dp[i-2];
                dp[i] %= 1000000007;
            }
        } else {
            dp[step - 1] = 1;
        }
        System.out.println(dp[step-1]);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        int step = scanner.nextInt();
        int ng = scanner.nextInt();
        long [] dp = new long[step];
        for(int i = 0; i < step; i++) dp[i] = 0;
        if (ng > 0) {
            int [] breaks = new int[step];
            for(int i = 0; i < ng ; i++) breaks[i] = scanner.nextInt();
            for(int i = 0; i < ng; i++) dp[breaks[i]-1] = -100000000000000000l;
        }
        
        if(step > 1) {
            if (dp[0] == 0 && dp[1] == 0) {
                dp[0] = 1;
                dp[1] = 2;
            } else if (dp[0] == 0) {
                dp[0] = 1;
            } else if (dp[1] == 0) {
                dp[1] = 1;
            }
            for(int i = 2; i < step; i++) {
                if (dp[i] < 0) continue;
                if (dp[i-1] > 0) dp[i] += dp[i-1];
                if (dp[i-2] > 0) dp[i] += dp[i-2];
                dp[i] %= 1000000007;
            }
        } else {
            dp[step - 1] = 1;
        }
        System.out.println(dp[step-1]);
    }
} Main public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        int step = scanner.nextInt();
        int ng = scanner.nextInt();
        long [] dp = new long[step];
        for(int i = 0; i < step; i++) dp[i] = 0;
        if (ng > 0) {
            int [] breaks = new int[step];
            for(int i = 0; i < ng ; i++) breaks[i] = scanner.nextInt();
            for(int i = 0; i < ng; i++) dp[breaks[i]-1] = -100000000000000000l;
        }
        
        if(step > 1) {
            if (dp[0] == 0 && dp[1] == 0) {
                dp[0] = 1;
                dp[1] = 2;
            } else if (dp[0] == 0) {
                dp[0] = 1;
            } else if (dp[1] == 0) {
                dp[1] = 1;
            }
            for(int i = 2; i < step; i++) {
                if (dp[i] < 0) continue;
                if (dp[i-1] > 0) dp[i] += dp[i-1];
                if (dp[i-2] > 0) dp[i] += dp[i-2];
                dp[i] %= 1000000007;
            }
        } else {
            dp[step - 1] = 1;
        }
        System.out.println(dp[step-1]);
    } main {
        Scanner scanner= new Scanner(System.in);
        int step = scanner.nextInt();
        int ng = scanner.nextInt();
        long [] dp = new long[step];
        for(int i = 0; i < step; i++) dp[i] = 0;
        if (ng > 0) {
            int [] breaks = new int[step];
            for(int i = 0; i < ng ; i++) breaks[i] = scanner.nextInt();
            for(int i = 0; i < ng; i++) dp[breaks[i]-1] = -100000000000000000l;
        }
        
        if(step > 1) {
            if (dp[0] == 0 && dp[1] == 0) {
                dp[0] = 1;
                dp[1] = 2;
            } else if (dp[0] == 0) {
                dp[0] = 1;
            } else if (dp[1] == 0) {
                dp[1] = 1;
            }
            for(int i = 2; i < step; i++) {
                if (dp[i] < 0) continue;
                if (dp[i-1] > 0) dp[i] += dp[i-1];
                if (dp[i-2] > 0) dp[i] += dp[i-2];
                dp[i] %= 1000000007;
            }
        } else {
            dp[step - 1] = 1;
        }
        System.out.println(dp[step-1]);
    } Scanner scanner= new Scanner(System.in); scanner new Scanner(System.in) int step = scanner.nextInt(); step scanner.nextInt() scanner.nextInt scanner int ng = scanner.nextInt(); ng scanner.nextInt() scanner.nextInt scanner long [] dp = new long[step]; dp new long[step] step for(int i = 0; i < step; i++) dp[i] = 0; int i = 0; int i = 0; i 0 i < step i step i++ i++ i dp[i] = 0; dp[i] = 0 dp[i] dp i 0 if (ng > 0) {
            int [] breaks = new int[step];
            for(int i = 0; i < ng ; i++) breaks[i] = scanner.nextInt();
            for(int i = 0; i < ng; i++) dp[breaks[i]-1] = -100000000000000000l;
        } ng > 0 ng 0 {
            int [] breaks = new int[step];
            for(int i = 0; i < ng ; i++) breaks[i] = scanner.nextInt();
            for(int i = 0; i < ng; i++) dp[breaks[i]-1] = -100000000000000000l;
        } int [] breaks = new int[step]; breaks new int[step] step for(int i = 0; i < ng ; i++) breaks[i] = scanner.nextInt(); int i = 0; int i = 0; i 0 i < ng i ng i++ i++ i breaks[i] = scanner.nextInt(); breaks[i] = scanner.nextInt() breaks[i] breaks i scanner.nextInt() scanner.nextInt scanner for(int i = 0; i < ng; i++) dp[breaks[i]-1] = -100000000000000000l; int i = 0; int i = 0; i 0 i < ng i ng i++ i++ i dp[breaks[i]-1] = -100000000000000000l; dp[breaks[i]-1] = -100000000000000000l dp[breaks[i]-1] dp breaks[i]-1 breaks[i] breaks i 1 -100000000000000000l 100000000000000000l if(step > 1) {
            if (dp[0] == 0 && dp[1] == 0) {
                dp[0] = 1;
                dp[1] = 2;
            } else if (dp[0] == 0) {
                dp[0] = 1;
            } else if (dp[1] == 0) {
                dp[1] = 1;
            }
            for(int i = 2; i < step; i++) {
                if (dp[i] < 0) continue;
                if (dp[i-1] > 0) dp[i] += dp[i-1];
                if (dp[i-2] > 0) dp[i] += dp[i-2];
                dp[i] %= 1000000007;
            }
        } else {
            dp[step - 1] = 1;
        } step > 1 step 1 {
            if (dp[0] == 0 && dp[1] == 0) {
                dp[0] = 1;
                dp[1] = 2;
            } else if (dp[0] == 0) {
                dp[0] = 1;
            } else if (dp[1] == 0) {
                dp[1] = 1;
            }
            for(int i = 2; i < step; i++) {
                if (dp[i] < 0) continue;
                if (dp[i-1] > 0) dp[i] += dp[i-1];
                if (dp[i-2] > 0) dp[i] += dp[i-2];
                dp[i] %= 1000000007;
            }
        } if (dp[0] == 0 && dp[1] == 0) {
                dp[0] = 1;
                dp[1] = 2;
            } else if (dp[0] == 0) {
                dp[0] = 1;
            } else if (dp[1] == 0) {
                dp[1] = 1;
            } dp[0] == 0 && dp[1] == 0 dp[0] == 0 dp[0] dp 0 0 dp[1] == 0 dp[1] dp 1 0 {
                dp[0] = 1;
                dp[1] = 2;
            } dp[0] = 1 dp[0] dp 0 1 dp[1] = 2 dp[1] dp 1 2 if (dp[0] == 0) {
                dp[0] = 1;
            } else if (dp[1] == 0) {
                dp[1] = 1;
            } dp[0] == 0 dp[0] dp 0 0 {
                dp[0] = 1;
            } dp[0] = 1 dp[0] dp 0 1 if (dp[1] == 0) {
                dp[1] = 1;
            } dp[1] == 0 dp[1] dp 1 0 {
                dp[1] = 1;
            } dp[1] = 1 dp[1] dp 1 1 for(int i = 2; i < step; i++) {
                if (dp[i] < 0) continue;
                if (dp[i-1] > 0) dp[i] += dp[i-1];
                if (dp[i-2] > 0) dp[i] += dp[i-2];
                dp[i] %= 1000000007;
            } int i = 2; int i = 2; i 2 i < step i step i++ i++ i {
                if (dp[i] < 0) continue;
                if (dp[i-1] > 0) dp[i] += dp[i-1];
                if (dp[i-2] > 0) dp[i] += dp[i-2];
                dp[i] %= 1000000007;
            } {
                if (dp[i] < 0) continue;
                if (dp[i-1] > 0) dp[i] += dp[i-1];
                if (dp[i-2] > 0) dp[i] += dp[i-2];
                dp[i] %= 1000000007;
            } if (dp[i] < 0) continue; dp[i] < 0 dp[i] dp i 0 continue; if (dp[i-1] > 0) dp[i] += dp[i-1]; dp[i-1] > 0 dp[i-1] dp i-1 i 1 0 dp[i] += dp[i-1] dp[i] dp i dp[i-1] dp i-1 i 1 if (dp[i-2] > 0) dp[i] += dp[i-2]; dp[i-2] > 0 dp[i-2] dp i-2 i 2 0 dp[i] += dp[i-2] dp[i] dp i dp[i-2] dp i-2 i 2 dp[i] %= 1000000007 dp[i] dp i 1000000007 {
            dp[step - 1] = 1;
        } dp[step - 1] = 1 dp[step - 1] dp step - 1 step 1 1 System.out.println(dp[step-1]) System.out.println System.out System System.out dp[step-1] dp step-1 step 1 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        int step = scanner.nextInt();
        int ng = scanner.nextInt();
        long [] dp = new long[step];
        for(int i = 0; i < step; i++) dp[i] = 0;
        if (ng > 0) {
            int [] breaks = new int[step];
            for(int i = 0; i < ng ; i++) breaks[i] = scanner.nextInt();
            for(int i = 0; i < ng; i++) dp[breaks[i]-1] = -100000000000000000l;
        }
        
        if(step > 1) {
            if (dp[0] == 0 && dp[1] == 0) {
                dp[0] = 1;
                dp[1] = 2;
            } else if (dp[0] == 0) {
                dp[0] = 1;
            } else if (dp[1] == 0) {
                dp[1] = 1;
            }
            for(int i = 2; i < step; i++) {
                if (dp[i] < 0) continue;
                if (dp[i-1] > 0) dp[i] += dp[i-1];
                if (dp[i-2] > 0) dp[i] += dp[i-2];
                dp[i] %= 1000000007;
            }
        } else {
            dp[step - 1] = 1;
        }
        System.out.println(dp[step-1]);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        int step = scanner.nextInt();
        int ng = scanner.nextInt();
        long [] dp = new long[step];
        for(int i = 0; i < step; i++) dp[i] = 0;
        if (ng > 0) {
            int [] breaks = new int[step];
            for(int i = 0; i < ng ; i++) breaks[i] = scanner.nextInt();
            for(int i = 0; i < ng; i++) dp[breaks[i]-1] = -100000000000000000l;
        }
        
        if(step > 1) {
            if (dp[0] == 0 && dp[1] == 0) {
                dp[0] = 1;
                dp[1] = 2;
            } else if (dp[0] == 0) {
                dp[0] = 1;
            } else if (dp[1] == 0) {
                dp[1] = 1;
            }
            for(int i = 2; i < step; i++) {
                if (dp[i] < 0) continue;
                if (dp[i-1] > 0) dp[i] += dp[i-1];
                if (dp[i-2] > 0) dp[i] += dp[i-2];
                dp[i] %= 1000000007;
            }
        } else {
            dp[step - 1] = 1;
        }
        System.out.println(dp[step-1]);
    }
} Main
import java.util.Scanner;

/**
 * @author yoshizaki
 * abc 129
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        int step = scanner.nextInt();
        int ng = scanner.nextInt();
        long [] dp = new long[step];
        for(int i = 0; i < step; i++) dp[i] = 0;
        if (ng > 0) {
            int [] breaks = new int[step];
            for(int i = 0; i < ng ; i++) breaks[i] = scanner.nextInt();
            for(int i = 0; i < ng; i++) dp[breaks[i]-1] = -100000000000000000l;
        }
        
        if(step > 1) {
            if (dp[0] == 0 && dp[1] == 0) {
                dp[0] = 1;
                dp[1] = 2;
            } else if (dp[0] == 0) {
                dp[0] = 1;
            } else if (dp[1] == 0) {
                dp[1] = 1;
            }
            for(int i = 2; i < step; i++) {
                if (dp[i] < 0) continue;
                if (dp[i-1] > 0) dp[i] += dp[i-1];
                if (dp[i-2] > 0) dp[i] += dp[i-2];
                dp[i] %= 1000000007;
            }
        } else {
            dp[step - 1] = 1;
        }
        System.out.println(dp[step-1]);
    }
}