import java.util.*;
import java.io.*;

public class Main {
    static int Q;
    static int N;
    static int M;
    static int[] a;
    public static void main(String[] args) {
        N = sc.nextInt();
        M = sc.nextInt();
        a = new int[M];
        for (int i = 0; i < M; i++) {
            a[i] = sc.nextInt();
        }
        int[] dp = new int[N+10];
        dp[0] = 1;
        int index = 0;
        for(int i = 0; i < N+1; i++) {
            //index s.t. a[index] >= i
            while(index < M && a[index] < i) index++;
            if(index < M && i == a[index]) continue;
            dp[i+1] += dp[i];
            dp[i+1] %= MOD;
            dp[i+2] += dp[i];
            dp[i+2] %= MOD;
        }
        // System.out.println(dp[N]);
        writer.println(dp[N]);
        writer.flush();
    }
		//Copy From HERE//


    static final FastScanner sc = new FastScanner(System.in);
    static PrintWriter writer = new PrintWriter(System.out);
    // usage
    // writer.println("sth");
    // writer.flush();

    static class FastScanner {
		Reader input;
 
		FastScanner() {
			this(System.in);
		}
 
		FastScanner(InputStream stream) {
			this.input = new BufferedReader(new InputStreamReader(stream));
		}
 
		int nextInt() {
			return (int) nextLong();
		}
 
		long nextLong() {
			try {
				int sign = 1;
				int b = input.read();
				while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				}
				if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				}
				long ret = b - '0';
				while (true) {
					b = input.read();
					if (b < '0' || '9' < b) return ret * sign;
					ret *= 10;
					ret += b - '0';
				}
			} catch (IOException e) {
				e.printStackTrace();
				return -1;
			}
		}
 
		double nextDouble() {
			try {
				double sign = 1;
				int b = input.read();
				while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				}
				if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				}
				double ret = b - '0';
				while (true) {
					b = input.read();
					if (b < '0' || '9' < b) break;
					ret *= 10;
					ret += b - '0';
				}
				if (b != '.') return sign * ret;
				double div = 1;
				b = input.read();
				while ('0' <= b && b <= '9') {
					ret *= 10;
					ret += b - '0';
					div *= 10;
					b = input.read();
				}
				return sign * ret / div;
			} catch (IOException e) {
				e.printStackTrace();
				return Double.NaN;
			}
		}
 
		char nextChar() {
			try {
				int b = input.read();
				while (Character.isWhitespace(b)) {
					b = input.read();
				}
				return (char) b;
			} catch (IOException e) {
				e.printStackTrace();
				return 0;
			}
		}
 
		String nextStr() {
			try {
				StringBuilder sb = new StringBuilder();
				int b = input.read();
				while (Character.isWhitespace(b)) {
					b = input.read();
				}
				while (b != -1 && !Character.isWhitespace(b)) {
					sb.append((char) b);
					b = input.read();
				}
				return sb.toString();
			} catch (IOException e) {
				e.printStackTrace();
				return "";
			}
		}
	}

	//COPY ABOVE HERE


    //Copy & paste below codes
    public static final int MOD = 1_000_000_007;
    public static int[] fact;
    public static int[] invfact;

    /**
     * 
     * @param n Calculate factorials/inverse factorials for x = [0,n]
     */
    public static void preCalcFactorials(int n) {
        fact = new int[n + 1];
        invfact = new int[n + 1];
        fact[0] = 1;
        invfact[0] = 1;
        for (int i = 1; i < n + 1; i++) {
            fact[i] = modProd(i, fact[i-1]);
            int inv = invMod(i);
            invfact[i] = modProd(inv, invfact[i-1]);
        }
    }

    public static int properMod(int x) {
        int ans = x%MOD;
        if (ans < 0) ans += MOD;
        return ans;
    }

    /**
     * preCalcFactorials() should be executed beforehand.
     * Calculate nCm modulo to global MOD.
     * @param n
     * @param m
     * @return
     */
    public static int combMod(int n, int m) {
        int ans = modProd(fact[n], invfact[n-m]);
        ans = modProd(ans, invfact[m]);
        return ans;
    }
    /**
     * Calculate a product of 2 integers modulo to mod
     * @param x
     * @param y
     * @param mod modulo
     * @return
     */
    public static int modProd(int x, int y) {
        long ans = ((long) x) * ((long) y); //prevent overflow
        ans %= MOD;
        if (ans < 0) ans += MOD;
        return (int) ans;
    }
    /**
     * Calculate a power of integer modulo to mod
     * @param x
     * @param pow
     * @param mod
     * @return
     */
    public static int modPow(int x, int pow) {
        if (pow == 0) return 1;
        int y = modProd(x,x);
        int ans; 
        if (pow % 2 == 1) {
            ans = x;
        } else {
            ans = 1;
        }
        ans = modProd(ans, modPow(y, pow/2));
        return ans;
    }
    /**
     * Calculate a inverse of an integer modulo to mod, using Fermat's Theorem.
     * Assuming mod is a prime number.
     * @param x
     * @param mod
     * @return
     */
    public static int invMod(int x) {
        return modPow(x, MOD - 2);
    }

    /**
     * x / y modulo MOD global
     * @param x
     * @param y
     * @return
     */
    public static int modDivide(int x, int y) {
        return modProd(x, invMod(y));
    }

    //Copy & paste above code


} import java.util.*; util.* java import java.io.*; io.* java public class Main {
    static int Q;
    static int N;
    static int M;
    static int[] a;
    public static void main(String[] args) {
        N = sc.nextInt();
        M = sc.nextInt();
        a = new int[M];
        for (int i = 0; i < M; i++) {
            a[i] = sc.nextInt();
        }
        int[] dp = new int[N+10];
        dp[0] = 1;
        int index = 0;
        for(int i = 0; i < N+1; i++) {
            //index s.t. a[index] >= i
            while(index < M && a[index] < i) index++;
            if(index < M && i == a[index]) continue;
            dp[i+1] += dp[i];
            dp[i+1] %= MOD;
            dp[i+2] += dp[i];
            dp[i+2] %= MOD;
        }
        // System.out.println(dp[N]);
        writer.println(dp[N]);
        writer.flush();
    }
		//Copy From HERE//


    static final FastScanner sc = new FastScanner(System.in);
    static PrintWriter writer = new PrintWriter(System.out);
    // usage
    // writer.println("sth");
    // writer.flush();

    static class FastScanner {
		Reader input;
 
		FastScanner() {
			this(System.in);
		}
 
		FastScanner(InputStream stream) {
			this.input = new BufferedReader(new InputStreamReader(stream));
		}
 
		int nextInt() {
			return (int) nextLong();
		}
 
		long nextLong() {
			try {
				int sign = 1;
				int b = input.read();
				while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				}
				if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				}
				long ret = b - '0';
				while (true) {
					b = input.read();
					if (b < '0' || '9' < b) return ret * sign;
					ret *= 10;
					ret += b - '0';
				}
			} catch (IOException e) {
				e.printStackTrace();
				return -1;
			}
		}
 
		double nextDouble() {
			try {
				double sign = 1;
				int b = input.read();
				while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				}
				if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				}
				double ret = b - '0';
				while (true) {
					b = input.read();
					if (b < '0' || '9' < b) break;
					ret *= 10;
					ret += b - '0';
				}
				if (b != '.') return sign * ret;
				double div = 1;
				b = input.read();
				while ('0' <= b && b <= '9') {
					ret *= 10;
					ret += b - '0';
					div *= 10;
					b = input.read();
				}
				return sign * ret / div;
			} catch (IOException e) {
				e.printStackTrace();
				return Double.NaN;
			}
		}
 
		char nextChar() {
			try {
				int b = input.read();
				while (Character.isWhitespace(b)) {
					b = input.read();
				}
				return (char) b;
			} catch (IOException e) {
				e.printStackTrace();
				return 0;
			}
		}
 
		String nextStr() {
			try {
				StringBuilder sb = new StringBuilder();
				int b = input.read();
				while (Character.isWhitespace(b)) {
					b = input.read();
				}
				while (b != -1 && !Character.isWhitespace(b)) {
					sb.append((char) b);
					b = input.read();
				}
				return sb.toString();
			} catch (IOException e) {
				e.printStackTrace();
				return "";
			}
		}
	}

	//COPY ABOVE HERE


    //Copy & paste below codes
    public static final int MOD = 1_000_000_007;
    public static int[] fact;
    public static int[] invfact;

    /**
     * 
     * @param n Calculate factorials/inverse factorials for x = [0,n]
     */
    public static void preCalcFactorials(int n) {
        fact = new int[n + 1];
        invfact = new int[n + 1];
        fact[0] = 1;
        invfact[0] = 1;
        for (int i = 1; i < n + 1; i++) {
            fact[i] = modProd(i, fact[i-1]);
            int inv = invMod(i);
            invfact[i] = modProd(inv, invfact[i-1]);
        }
    }

    public static int properMod(int x) {
        int ans = x%MOD;
        if (ans < 0) ans += MOD;
        return ans;
    }

    /**
     * preCalcFactorials() should be executed beforehand.
     * Calculate nCm modulo to global MOD.
     * @param n
     * @param m
     * @return
     */
    public static int combMod(int n, int m) {
        int ans = modProd(fact[n], invfact[n-m]);
        ans = modProd(ans, invfact[m]);
        return ans;
    }
    /**
     * Calculate a product of 2 integers modulo to mod
     * @param x
     * @param y
     * @param mod modulo
     * @return
     */
    public static int modProd(int x, int y) {
        long ans = ((long) x) * ((long) y); //prevent overflow
        ans %= MOD;
        if (ans < 0) ans += MOD;
        return (int) ans;
    }
    /**
     * Calculate a power of integer modulo to mod
     * @param x
     * @param pow
     * @param mod
     * @return
     */
    public static int modPow(int x, int pow) {
        if (pow == 0) return 1;
        int y = modProd(x,x);
        int ans; 
        if (pow % 2 == 1) {
            ans = x;
        } else {
            ans = 1;
        }
        ans = modProd(ans, modPow(y, pow/2));
        return ans;
    }
    /**
     * Calculate a inverse of an integer modulo to mod, using Fermat's Theorem.
     * Assuming mod is a prime number.
     * @param x
     * @param mod
     * @return
     */
    public static int invMod(int x) {
        return modPow(x, MOD - 2);
    }

    /**
     * x / y modulo MOD global
     * @param x
     * @param y
     * @return
     */
    public static int modDivide(int x, int y) {
        return modProd(x, invMod(y));
    }

    //Copy & paste above code


} Main static int Q; Q static int N; N static int M; M static int[] a; a static final FastScanner sc = new FastScanner(System.in); sc new FastScanner(System.in) static PrintWriter writer = new PrintWriter(System.out); writer new PrintWriter(System.out) //Copy & paste below codes
    public static final int MOD = 1_000_000_007; MOD 1_000_000_007 public static int[] fact; fact public static int[] invfact; invfact public static void main(String[] args) {
        N = sc.nextInt();
        M = sc.nextInt();
        a = new int[M];
        for (int i = 0; i < M; i++) {
            a[i] = sc.nextInt();
        }
        int[] dp = new int[N+10];
        dp[0] = 1;
        int index = 0;
        for(int i = 0; i < N+1; i++) {
            //index s.t. a[index] >= i
            while(index < M && a[index] < i) index++;
            if(index < M && i == a[index]) continue;
            dp[i+1] += dp[i];
            dp[i+1] %= MOD;
            dp[i+2] += dp[i];
            dp[i+2] %= MOD;
        }
        // System.out.println(dp[N]);
        writer.println(dp[N]);
        writer.flush();
    } main {
        N = sc.nextInt();
        M = sc.nextInt();
        a = new int[M];
        for (int i = 0; i < M; i++) {
            a[i] = sc.nextInt();
        }
        int[] dp = new int[N+10];
        dp[0] = 1;
        int index = 0;
        for(int i = 0; i < N+1; i++) {
            //index s.t. a[index] >= i
            while(index < M && a[index] < i) index++;
            if(index < M && i == a[index]) continue;
            dp[i+1] += dp[i];
            dp[i+1] %= MOD;
            dp[i+2] += dp[i];
            dp[i+2] %= MOD;
        }
        // System.out.println(dp[N]);
        writer.println(dp[N]);
        writer.flush();
    } N = sc.nextInt() N sc.nextInt() sc.nextInt sc M = sc.nextInt() M sc.nextInt() sc.nextInt sc a = new int[M] a new int[M] M for (int i = 0; i < M; i++) {
            a[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
            a[i] = sc.nextInt();
        } {
            a[i] = sc.nextInt();
        } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc int[] dp = new int[N+10]; dp new int[N+10] N+10 N 10 dp[0] = 1 dp[0] dp 0 1 int index = 0; index 0 for(int i = 0; i < N+1; i++) {
            //index s.t. a[index] >= i
            while(index < M && a[index] < i) index++;
            if(index < M && i == a[index]) continue;
            dp[i+1] += dp[i];
            dp[i+1] %= MOD;
            dp[i+2] += dp[i];
            dp[i+2] %= MOD;
        } int i = 0; int i = 0; i 0 i < N+1 i N+1 N 1 i++ i++ i {
            //index s.t. a[index] >= i
            while(index < M && a[index] < i) index++;
            if(index < M && i == a[index]) continue;
            dp[i+1] += dp[i];
            dp[i+1] %= MOD;
            dp[i+2] += dp[i];
            dp[i+2] %= MOD;
        } {
            //index s.t. a[index] >= i
            while(index < M && a[index] < i) index++;
            if(index < M && i == a[index]) continue;
            dp[i+1] += dp[i];
            dp[i+1] %= MOD;
            dp[i+2] += dp[i];
            dp[i+2] %= MOD;
        } while(index < M && a[index] < i) index++; index < M && a[index] < i index < M index M a[index] < i a[index] a index i index++ index if(index < M && i == a[index]) continue; index < M && i == a[index] index < M index M i == a[index] i a[index] a index continue; dp[i+1] += dp[i] dp[i+1] dp i+1 i 1 dp[i] dp i dp[i+1] %= MOD dp[i+1] dp i+1 i 1 MOD dp[i+2] += dp[i] dp[i+2] dp i+2 i 2 dp[i] dp i dp[i+2] %= MOD dp[i+2] dp i+2 i 2 MOD writer.println(dp[N]) writer.println writer dp[N] dp N writer.flush() writer.flush writer String[] args args /**
     * 
     * @param n Calculate factorials/inverse factorials for x = [0,n]
     */
    public static void preCalcFactorials(int n) {
        fact = new int[n + 1];
        invfact = new int[n + 1];
        fact[0] = 1;
        invfact[0] = 1;
        for (int i = 1; i < n + 1; i++) {
            fact[i] = modProd(i, fact[i-1]);
            int inv = invMod(i);
            invfact[i] = modProd(inv, invfact[i-1]);
        }
    } preCalcFactorials {
        fact = new int[n + 1];
        invfact = new int[n + 1];
        fact[0] = 1;
        invfact[0] = 1;
        for (int i = 1; i < n + 1; i++) {
            fact[i] = modProd(i, fact[i-1]);
            int inv = invMod(i);
            invfact[i] = modProd(inv, invfact[i-1]);
        }
    } fact = new int[n + 1] fact new int[n + 1] n + 1 n 1 invfact = new int[n + 1] invfact new int[n + 1] n + 1 n 1 fact[0] = 1 fact[0] fact 0 1 invfact[0] = 1 invfact[0] invfact 0 1 for (int i = 1; i < n + 1; i++) {
            fact[i] = modProd(i, fact[i-1]);
            int inv = invMod(i);
            invfact[i] = modProd(inv, invfact[i-1]);
        } int i = 1; int i = 1; i 1 i < n + 1 i n + 1 n 1 i++ i++ i {
            fact[i] = modProd(i, fact[i-1]);
            int inv = invMod(i);
            invfact[i] = modProd(inv, invfact[i-1]);
        } {
            fact[i] = modProd(i, fact[i-1]);
            int inv = invMod(i);
            invfact[i] = modProd(inv, invfact[i-1]);
        } fact[i] = modProd(i, fact[i-1]) fact[i] fact i modProd(i, fact[i-1]) modProd i fact[i-1] fact i-1 i 1 int inv = invMod(i); inv invMod(i) invMod i invfact[i] = modProd(inv, invfact[i-1]) invfact[i] invfact i modProd(inv, invfact[i-1]) modProd inv invfact[i-1] invfact i-1 i 1 int n n public static int properMod(int x) {
        int ans = x%MOD;
        if (ans < 0) ans += MOD;
        return ans;
    } properMod {
        int ans = x%MOD;
        if (ans < 0) ans += MOD;
        return ans;
    } int ans = x%MOD; ans x%MOD x MOD if (ans < 0) ans += MOD; ans < 0 ans 0 ans += MOD ans MOD return ans; ans int x x /**
     * preCalcFactorials() should be executed beforehand.
     * Calculate nCm modulo to global MOD.
     * @param n
     * @param m
     * @return
     */
    public static int combMod(int n, int m) {
        int ans = modProd(fact[n], invfact[n-m]);
        ans = modProd(ans, invfact[m]);
        return ans;
    } combMod {
        int ans = modProd(fact[n], invfact[n-m]);
        ans = modProd(ans, invfact[m]);
        return ans;
    } int ans = modProd(fact[n], invfact[n-m]); ans modProd(fact[n], invfact[n-m]) modProd fact[n] fact n invfact[n-m] invfact n-m n m ans = modProd(ans, invfact[m]) ans modProd(ans, invfact[m]) modProd ans invfact[m] invfact m return ans; ans int n n int m m /**
     * Calculate a product of 2 integers modulo to mod
     * @param x
     * @param y
     * @param mod modulo
     * @return
     */
    public static int modProd(int x, int y) {
        long ans = ((long) x) * ((long) y); //prevent overflow
        ans %= MOD;
        if (ans < 0) ans += MOD;
        return (int) ans;
    } modProd {
        long ans = ((long) x) * ((long) y); //prevent overflow
        ans %= MOD;
        if (ans < 0) ans += MOD;
        return (int) ans;
    } long ans = ((long) x) * ((long) y); ans ((long) x) * ((long) y) ((long) x) ((long) y) ans %= MOD ans MOD if (ans < 0) ans += MOD; ans < 0 ans 0 ans += MOD ans MOD return (int) ans; (int) ans int x x int y y /**
     * Calculate a power of integer modulo to mod
     * @param x
     * @param pow
     * @param mod
     * @return
     */
    public static int modPow(int x, int pow) {
        if (pow == 0) return 1;
        int y = modProd(x,x);
        int ans; 
        if (pow % 2 == 1) {
            ans = x;
        } else {
            ans = 1;
        }
        ans = modProd(ans, modPow(y, pow/2));
        return ans;
    } modPow {
        if (pow == 0) return 1;
        int y = modProd(x,x);
        int ans; 
        if (pow % 2 == 1) {
            ans = x;
        } else {
            ans = 1;
        }
        ans = modProd(ans, modPow(y, pow/2));
        return ans;
    } if (pow == 0) return 1; pow == 0 pow 0 return 1; 1 int y = modProd(x,x); y modProd(x,x) modProd x x int ans; ans if (pow % 2 == 1) {
            ans = x;
        } else {
            ans = 1;
        } pow % 2 == 1 pow % 2 pow 2 1 {
            ans = x;
        } ans = x ans x {
            ans = 1;
        } ans = 1 ans 1 ans = modProd(ans, modPow(y, pow/2)) ans modProd(ans, modPow(y, pow/2)) modProd ans modPow(y, pow/2) modPow y pow/2 pow 2 return ans; ans int x x int pow pow /**
     * Calculate a inverse of an integer modulo to mod, using Fermat's Theorem.
     * Assuming mod is a prime number.
     * @param x
     * @param mod
     * @return
     */
    public static int invMod(int x) {
        return modPow(x, MOD - 2);
    } invMod {
        return modPow(x, MOD - 2);
    } return modPow(x, MOD - 2); modPow(x, MOD - 2) modPow x MOD - 2 MOD 2 int x x /**
     * x / y modulo MOD global
     * @param x
     * @param y
     * @return
     */
    public static int modDivide(int x, int y) {
        return modProd(x, invMod(y));
    } modDivide {
        return modProd(x, invMod(y));
    } return modProd(x, invMod(y)); modProd(x, invMod(y)) modProd x invMod(y) invMod y int x x int y y static class FastScanner {
		Reader input;
 
		FastScanner() {
			this(System.in);
		}
 
		FastScanner(InputStream stream) {
			this.input = new BufferedReader(new InputStreamReader(stream));
		}
 
		int nextInt() {
			return (int) nextLong();
		}
 
		long nextLong() {
			try {
				int sign = 1;
				int b = input.read();
				while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				}
				if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				}
				long ret = b - '0';
				while (true) {
					b = input.read();
					if (b < '0' || '9' < b) return ret * sign;
					ret *= 10;
					ret += b - '0';
				}
			} catch (IOException e) {
				e.printStackTrace();
				return -1;
			}
		}
 
		double nextDouble() {
			try {
				double sign = 1;
				int b = input.read();
				while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				}
				if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				}
				double ret = b - '0';
				while (true) {
					b = input.read();
					if (b < '0' || '9' < b) break;
					ret *= 10;
					ret += b - '0';
				}
				if (b != '.') return sign * ret;
				double div = 1;
				b = input.read();
				while ('0' <= b && b <= '9') {
					ret *= 10;
					ret += b - '0';
					div *= 10;
					b = input.read();
				}
				return sign * ret / div;
			} catch (IOException e) {
				e.printStackTrace();
				return Double.NaN;
			}
		}
 
		char nextChar() {
			try {
				int b = input.read();
				while (Character.isWhitespace(b)) {
					b = input.read();
				}
				return (char) b;
			} catch (IOException e) {
				e.printStackTrace();
				return 0;
			}
		}
 
		String nextStr() {
			try {
				StringBuilder sb = new StringBuilder();
				int b = input.read();
				while (Character.isWhitespace(b)) {
					b = input.read();
				}
				while (b != -1 && !Character.isWhitespace(b)) {
					sb.append((char) b);
					b = input.read();
				}
				return sb.toString();
			} catch (IOException e) {
				e.printStackTrace();
				return "";
			}
		}
	} FastScanner Reader input; input FastScanner() {
			this(System.in);
		} FastScanner {
			this(System.in);
		} this(System.in) this System.in System System.in FastScanner(InputStream stream) {
			this.input = new BufferedReader(new InputStreamReader(stream));
		} FastScanner {
			this.input = new BufferedReader(new InputStreamReader(stream));
		} this.input = new BufferedReader(new InputStreamReader(stream)) this.input this this.input new BufferedReader(new InputStreamReader(stream)) InputStream stream stream int nextInt() {
			return (int) nextLong();
		} nextInt {
			return (int) nextLong();
		} return (int) nextLong(); (int) nextLong() nextLong long nextLong() {
			try {
				int sign = 1;
				int b = input.read();
				while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				}
				if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				}
				long ret = b - '0';
				while (true) {
					b = input.read();
					if (b < '0' || '9' < b) return ret * sign;
					ret *= 10;
					ret += b - '0';
				}
			} catch (IOException e) {
				e.printStackTrace();
				return -1;
			}
		} nextLong {
			try {
				int sign = 1;
				int b = input.read();
				while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				}
				if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				}
				long ret = b - '0';
				while (true) {
					b = input.read();
					if (b < '0' || '9' < b) return ret * sign;
					ret *= 10;
					ret += b - '0';
				}
			} catch (IOException e) {
				e.printStackTrace();
				return -1;
			}
		} try {
				int sign = 1;
				int b = input.read();
				while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				}
				if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				}
				long ret = b - '0';
				while (true) {
					b = input.read();
					if (b < '0' || '9' < b) return ret * sign;
					ret *= 10;
					ret += b - '0';
				}
			} catch (IOException e) {
				e.printStackTrace();
				return -1;
			} catch (IOException e) {
				e.printStackTrace();
				return -1;
			} IOException e {
				e.printStackTrace();
				return -1;
			} e.printStackTrace() e.printStackTrace e return -1; -1 1 {
				int sign = 1;
				int b = input.read();
				while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				}
				if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				}
				long ret = b - '0';
				while (true) {
					b = input.read();
					if (b < '0' || '9' < b) return ret * sign;
					ret *= 10;
					ret += b - '0';
				}
			} int sign = 1; sign 1 int b = input.read(); b input.read() input.read input while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				} (b < '0' || '9' < b) && b != '-' && b != '+' (b < '0' || '9' < b) && b != '-' && b != '+' (b < '0' || '9' < b) b < '0' b '0' '9' < b '9' b b != '-' b '-' b != '+' b '+' {
					b = input.read();
				} b = input.read() b input.read() input.read input if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				} b == '-' b '-' {
					sign = -1;
					b = input.read();
				} sign = -1 sign -1 1 b = input.read() b input.read() input.read input if (b == '+') {
					b = input.read();
				} b == '+' b '+' {
					b = input.read();
				} b = input.read() b input.read() input.read input long ret = b - '0'; ret b - '0' b '0' while (true) {
					b = input.read();
					if (b < '0' || '9' < b) return ret * sign;
					ret *= 10;
					ret += b - '0';
				} true {
					b = input.read();
					if (b < '0' || '9' < b) return ret * sign;
					ret *= 10;
					ret += b - '0';
				} b = input.read() b input.read() input.read input if (b < '0' || '9' < b) return ret * sign; b < '0' || '9' < b b < '0' b '0' '9' < b '9' b return ret * sign; ret * sign ret sign ret *= 10 ret 10 ret += b - '0' ret b - '0' b '0' double nextDouble() {
			try {
				double sign = 1;
				int b = input.read();
				while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				}
				if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				}
				double ret = b - '0';
				while (true) {
					b = input.read();
					if (b < '0' || '9' < b) break;
					ret *= 10;
					ret += b - '0';
				}
				if (b != '.') return sign * ret;
				double div = 1;
				b = input.read();
				while ('0' <= b && b <= '9') {
					ret *= 10;
					ret += b - '0';
					div *= 10;
					b = input.read();
				}
				return sign * ret / div;
			} catch (IOException e) {
				e.printStackTrace();
				return Double.NaN;
			}
		} nextDouble {
			try {
				double sign = 1;
				int b = input.read();
				while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				}
				if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				}
				double ret = b - '0';
				while (true) {
					b = input.read();
					if (b < '0' || '9' < b) break;
					ret *= 10;
					ret += b - '0';
				}
				if (b != '.') return sign * ret;
				double div = 1;
				b = input.read();
				while ('0' <= b && b <= '9') {
					ret *= 10;
					ret += b - '0';
					div *= 10;
					b = input.read();
				}
				return sign * ret / div;
			} catch (IOException e) {
				e.printStackTrace();
				return Double.NaN;
			}
		} try {
				double sign = 1;
				int b = input.read();
				while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				}
				if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				}
				double ret = b - '0';
				while (true) {
					b = input.read();
					if (b < '0' || '9' < b) break;
					ret *= 10;
					ret += b - '0';
				}
				if (b != '.') return sign * ret;
				double div = 1;
				b = input.read();
				while ('0' <= b && b <= '9') {
					ret *= 10;
					ret += b - '0';
					div *= 10;
					b = input.read();
				}
				return sign * ret / div;
			} catch (IOException e) {
				e.printStackTrace();
				return Double.NaN;
			} catch (IOException e) {
				e.printStackTrace();
				return Double.NaN;
			} IOException e {
				e.printStackTrace();
				return Double.NaN;
			} e.printStackTrace() e.printStackTrace e return Double.NaN; Double.NaN Double Double.NaN {
				double sign = 1;
				int b = input.read();
				while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				}
				if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				}
				double ret = b - '0';
				while (true) {
					b = input.read();
					if (b < '0' || '9' < b) break;
					ret *= 10;
					ret += b - '0';
				}
				if (b != '.') return sign * ret;
				double div = 1;
				b = input.read();
				while ('0' <= b && b <= '9') {
					ret *= 10;
					ret += b - '0';
					div *= 10;
					b = input.read();
				}
				return sign * ret / div;
			} double sign = 1; sign 1 int b = input.read(); b input.read() input.read input while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				} (b < '0' || '9' < b) && b != '-' && b != '+' (b < '0' || '9' < b) && b != '-' && b != '+' (b < '0' || '9' < b) b < '0' b '0' '9' < b '9' b b != '-' b '-' b != '+' b '+' {
					b = input.read();
				} b = input.read() b input.read() input.read input if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				} b == '-' b '-' {
					sign = -1;
					b = input.read();
				} sign = -1 sign -1 1 b = input.read() b input.read() input.read input if (b == '+') {
					b = input.read();
				} b == '+' b '+' {
					b = input.read();
				} b = input.read() b input.read() input.read input double ret = b - '0'; ret b - '0' b '0' while (true) {
					b = input.read();
					if (b < '0' || '9' < b) break;
					ret *= 10;
					ret += b - '0';
				} true {
					b = input.read();
					if (b < '0' || '9' < b) break;
					ret *= 10;
					ret += b - '0';
				} b = input.read() b input.read() input.read input if (b < '0' || '9' < b) break; b < '0' || '9' < b b < '0' b '0' '9' < b '9' b break; ret *= 10 ret 10 ret += b - '0' ret b - '0' b '0' if (b != '.') return sign * ret; b != '.' b '.' return sign * ret; sign * ret sign ret double div = 1; div 1 b = input.read() b input.read() input.read input while ('0' <= b && b <= '9') {
					ret *= 10;
					ret += b - '0';
					div *= 10;
					b = input.read();
				} '0' <= b && b <= '9' '0' <= b '0' b b <= '9' b '9' {
					ret *= 10;
					ret += b - '0';
					div *= 10;
					b = input.read();
				} ret *= 10 ret 10 ret += b - '0' ret b - '0' b '0' div *= 10 div 10 b = input.read() b input.read() input.read input return sign * ret / div; sign * ret / div sign * ret sign ret div char nextChar() {
			try {
				int b = input.read();
				while (Character.isWhitespace(b)) {
					b = input.read();
				}
				return (char) b;
			} catch (IOException e) {
				e.printStackTrace();
				return 0;
			}
		} nextChar {
			try {
				int b = input.read();
				while (Character.isWhitespace(b)) {
					b = input.read();
				}
				return (char) b;
			} catch (IOException e) {
				e.printStackTrace();
				return 0;
			}
		} try {
				int b = input.read();
				while (Character.isWhitespace(b)) {
					b = input.read();
				}
				return (char) b;
			} catch (IOException e) {
				e.printStackTrace();
				return 0;
			} catch (IOException e) {
				e.printStackTrace();
				return 0;
			} IOException e {
				e.printStackTrace();
				return 0;
			} e.printStackTrace() e.printStackTrace e return 0; 0 {
				int b = input.read();
				while (Character.isWhitespace(b)) {
					b = input.read();
				}
				return (char) b;
			} int b = input.read(); b input.read() input.read input while (Character.isWhitespace(b)) {
					b = input.read();
				} Character.isWhitespace(b) Character.isWhitespace Character b {
					b = input.read();
				} b = input.read() b input.read() input.read input return (char) b; (char) b String nextStr() {
			try {
				StringBuilder sb = new StringBuilder();
				int b = input.read();
				while (Character.isWhitespace(b)) {
					b = input.read();
				}
				while (b != -1 && !Character.isWhitespace(b)) {
					sb.append((char) b);
					b = input.read();
				}
				return sb.toString();
			} catch (IOException e) {
				e.printStackTrace();
				return "";
			}
		} nextStr {
			try {
				StringBuilder sb = new StringBuilder();
				int b = input.read();
				while (Character.isWhitespace(b)) {
					b = input.read();
				}
				while (b != -1 && !Character.isWhitespace(b)) {
					sb.append((char) b);
					b = input.read();
				}
				return sb.toString();
			} catch (IOException e) {
				e.printStackTrace();
				return "";
			}
		} try {
				StringBuilder sb = new StringBuilder();
				int b = input.read();
				while (Character.isWhitespace(b)) {
					b = input.read();
				}
				while (b != -1 && !Character.isWhitespace(b)) {
					sb.append((char) b);
					b = input.read();
				}
				return sb.toString();
			} catch (IOException e) {
				e.printStackTrace();
				return "";
			} catch (IOException e) {
				e.printStackTrace();
				return "";
			} IOException e {
				e.printStackTrace();
				return "";
			} e.printStackTrace() e.printStackTrace e return ""; "" {
				StringBuilder sb = new StringBuilder();
				int b = input.read();
				while (Character.isWhitespace(b)) {
					b = input.read();
				}
				while (b != -1 && !Character.isWhitespace(b)) {
					sb.append((char) b);
					b = input.read();
				}
				return sb.toString();
			} StringBuilder sb = new StringBuilder(); sb new StringBuilder() int b = input.read(); b input.read() input.read input while (Character.isWhitespace(b)) {
					b = input.read();
				} Character.isWhitespace(b) Character.isWhitespace Character b {
					b = input.read();
				} b = input.read() b input.read() input.read input while (b != -1 && !Character.isWhitespace(b)) {
					sb.append((char) b);
					b = input.read();
				} b != -1 && !Character.isWhitespace(b) b != -1 b -1 1 !Character.isWhitespace(b) Character.isWhitespace(b) Character.isWhitespace Character b {
					sb.append((char) b);
					b = input.read();
				} sb.append((char) b) sb.append sb (char) b b = input.read() b input.read() input.read input return sb.toString(); sb.toString() sb.toString sb public class Main {
    static int Q;
    static int N;
    static int M;
    static int[] a;
    public static void main(String[] args) {
        N = sc.nextInt();
        M = sc.nextInt();
        a = new int[M];
        for (int i = 0; i < M; i++) {
            a[i] = sc.nextInt();
        }
        int[] dp = new int[N+10];
        dp[0] = 1;
        int index = 0;
        for(int i = 0; i < N+1; i++) {
            //index s.t. a[index] >= i
            while(index < M && a[index] < i) index++;
            if(index < M && i == a[index]) continue;
            dp[i+1] += dp[i];
            dp[i+1] %= MOD;
            dp[i+2] += dp[i];
            dp[i+2] %= MOD;
        }
        // System.out.println(dp[N]);
        writer.println(dp[N]);
        writer.flush();
    }
		//Copy From HERE//


    static final FastScanner sc = new FastScanner(System.in);
    static PrintWriter writer = new PrintWriter(System.out);
    // usage
    // writer.println("sth");
    // writer.flush();

    static class FastScanner {
		Reader input;
 
		FastScanner() {
			this(System.in);
		}
 
		FastScanner(InputStream stream) {
			this.input = new BufferedReader(new InputStreamReader(stream));
		}
 
		int nextInt() {
			return (int) nextLong();
		}
 
		long nextLong() {
			try {
				int sign = 1;
				int b = input.read();
				while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				}
				if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				}
				long ret = b - '0';
				while (true) {
					b = input.read();
					if (b < '0' || '9' < b) return ret * sign;
					ret *= 10;
					ret += b - '0';
				}
			} catch (IOException e) {
				e.printStackTrace();
				return -1;
			}
		}
 
		double nextDouble() {
			try {
				double sign = 1;
				int b = input.read();
				while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				}
				if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				}
				double ret = b - '0';
				while (true) {
					b = input.read();
					if (b < '0' || '9' < b) break;
					ret *= 10;
					ret += b - '0';
				}
				if (b != '.') return sign * ret;
				double div = 1;
				b = input.read();
				while ('0' <= b && b <= '9') {
					ret *= 10;
					ret += b - '0';
					div *= 10;
					b = input.read();
				}
				return sign * ret / div;
			} catch (IOException e) {
				e.printStackTrace();
				return Double.NaN;
			}
		}
 
		char nextChar() {
			try {
				int b = input.read();
				while (Character.isWhitespace(b)) {
					b = input.read();
				}
				return (char) b;
			} catch (IOException e) {
				e.printStackTrace();
				return 0;
			}
		}
 
		String nextStr() {
			try {
				StringBuilder sb = new StringBuilder();
				int b = input.read();
				while (Character.isWhitespace(b)) {
					b = input.read();
				}
				while (b != -1 && !Character.isWhitespace(b)) {
					sb.append((char) b);
					b = input.read();
				}
				return sb.toString();
			} catch (IOException e) {
				e.printStackTrace();
				return "";
			}
		}
	}

	//COPY ABOVE HERE


    //Copy & paste below codes
    public static final int MOD = 1_000_000_007;
    public static int[] fact;
    public static int[] invfact;

    /**
     * 
     * @param n Calculate factorials/inverse factorials for x = [0,n]
     */
    public static void preCalcFactorials(int n) {
        fact = new int[n + 1];
        invfact = new int[n + 1];
        fact[0] = 1;
        invfact[0] = 1;
        for (int i = 1; i < n + 1; i++) {
            fact[i] = modProd(i, fact[i-1]);
            int inv = invMod(i);
            invfact[i] = modProd(inv, invfact[i-1]);
        }
    }

    public static int properMod(int x) {
        int ans = x%MOD;
        if (ans < 0) ans += MOD;
        return ans;
    }

    /**
     * preCalcFactorials() should be executed beforehand.
     * Calculate nCm modulo to global MOD.
     * @param n
     * @param m
     * @return
     */
    public static int combMod(int n, int m) {
        int ans = modProd(fact[n], invfact[n-m]);
        ans = modProd(ans, invfact[m]);
        return ans;
    }
    /**
     * Calculate a product of 2 integers modulo to mod
     * @param x
     * @param y
     * @param mod modulo
     * @return
     */
    public static int modProd(int x, int y) {
        long ans = ((long) x) * ((long) y); //prevent overflow
        ans %= MOD;
        if (ans < 0) ans += MOD;
        return (int) ans;
    }
    /**
     * Calculate a power of integer modulo to mod
     * @param x
     * @param pow
     * @param mod
     * @return
     */
    public static int modPow(int x, int pow) {
        if (pow == 0) return 1;
        int y = modProd(x,x);
        int ans; 
        if (pow % 2 == 1) {
            ans = x;
        } else {
            ans = 1;
        }
        ans = modProd(ans, modPow(y, pow/2));
        return ans;
    }
    /**
     * Calculate a inverse of an integer modulo to mod, using Fermat's Theorem.
     * Assuming mod is a prime number.
     * @param x
     * @param mod
     * @return
     */
    public static int invMod(int x) {
        return modPow(x, MOD - 2);
    }

    /**
     * x / y modulo MOD global
     * @param x
     * @param y
     * @return
     */
    public static int modDivide(int x, int y) {
        return modProd(x, invMod(y));
    }

    //Copy & paste above code


} public class Main {
    static int Q;
    static int N;
    static int M;
    static int[] a;
    public static void main(String[] args) {
        N = sc.nextInt();
        M = sc.nextInt();
        a = new int[M];
        for (int i = 0; i < M; i++) {
            a[i] = sc.nextInt();
        }
        int[] dp = new int[N+10];
        dp[0] = 1;
        int index = 0;
        for(int i = 0; i < N+1; i++) {
            //index s.t. a[index] >= i
            while(index < M && a[index] < i) index++;
            if(index < M && i == a[index]) continue;
            dp[i+1] += dp[i];
            dp[i+1] %= MOD;
            dp[i+2] += dp[i];
            dp[i+2] %= MOD;
        }
        // System.out.println(dp[N]);
        writer.println(dp[N]);
        writer.flush();
    }
		//Copy From HERE//


    static final FastScanner sc = new FastScanner(System.in);
    static PrintWriter writer = new PrintWriter(System.out);
    // usage
    // writer.println("sth");
    // writer.flush();

    static class FastScanner {
		Reader input;
 
		FastScanner() {
			this(System.in);
		}
 
		FastScanner(InputStream stream) {
			this.input = new BufferedReader(new InputStreamReader(stream));
		}
 
		int nextInt() {
			return (int) nextLong();
		}
 
		long nextLong() {
			try {
				int sign = 1;
				int b = input.read();
				while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				}
				if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				}
				long ret = b - '0';
				while (true) {
					b = input.read();
					if (b < '0' || '9' < b) return ret * sign;
					ret *= 10;
					ret += b - '0';
				}
			} catch (IOException e) {
				e.printStackTrace();
				return -1;
			}
		}
 
		double nextDouble() {
			try {
				double sign = 1;
				int b = input.read();
				while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				}
				if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				}
				double ret = b - '0';
				while (true) {
					b = input.read();
					if (b < '0' || '9' < b) break;
					ret *= 10;
					ret += b - '0';
				}
				if (b != '.') return sign * ret;
				double div = 1;
				b = input.read();
				while ('0' <= b && b <= '9') {
					ret *= 10;
					ret += b - '0';
					div *= 10;
					b = input.read();
				}
				return sign * ret / div;
			} catch (IOException e) {
				e.printStackTrace();
				return Double.NaN;
			}
		}
 
		char nextChar() {
			try {
				int b = input.read();
				while (Character.isWhitespace(b)) {
					b = input.read();
				}
				return (char) b;
			} catch (IOException e) {
				e.printStackTrace();
				return 0;
			}
		}
 
		String nextStr() {
			try {
				StringBuilder sb = new StringBuilder();
				int b = input.read();
				while (Character.isWhitespace(b)) {
					b = input.read();
				}
				while (b != -1 && !Character.isWhitespace(b)) {
					sb.append((char) b);
					b = input.read();
				}
				return sb.toString();
			} catch (IOException e) {
				e.printStackTrace();
				return "";
			}
		}
	}

	//COPY ABOVE HERE


    //Copy & paste below codes
    public static final int MOD = 1_000_000_007;
    public static int[] fact;
    public static int[] invfact;

    /**
     * 
     * @param n Calculate factorials/inverse factorials for x = [0,n]
     */
    public static void preCalcFactorials(int n) {
        fact = new int[n + 1];
        invfact = new int[n + 1];
        fact[0] = 1;
        invfact[0] = 1;
        for (int i = 1; i < n + 1; i++) {
            fact[i] = modProd(i, fact[i-1]);
            int inv = invMod(i);
            invfact[i] = modProd(inv, invfact[i-1]);
        }
    }

    public static int properMod(int x) {
        int ans = x%MOD;
        if (ans < 0) ans += MOD;
        return ans;
    }

    /**
     * preCalcFactorials() should be executed beforehand.
     * Calculate nCm modulo to global MOD.
     * @param n
     * @param m
     * @return
     */
    public static int combMod(int n, int m) {
        int ans = modProd(fact[n], invfact[n-m]);
        ans = modProd(ans, invfact[m]);
        return ans;
    }
    /**
     * Calculate a product of 2 integers modulo to mod
     * @param x
     * @param y
     * @param mod modulo
     * @return
     */
    public static int modProd(int x, int y) {
        long ans = ((long) x) * ((long) y); //prevent overflow
        ans %= MOD;
        if (ans < 0) ans += MOD;
        return (int) ans;
    }
    /**
     * Calculate a power of integer modulo to mod
     * @param x
     * @param pow
     * @param mod
     * @return
     */
    public static int modPow(int x, int pow) {
        if (pow == 0) return 1;
        int y = modProd(x,x);
        int ans; 
        if (pow % 2 == 1) {
            ans = x;
        } else {
            ans = 1;
        }
        ans = modProd(ans, modPow(y, pow/2));
        return ans;
    }
    /**
     * Calculate a inverse of an integer modulo to mod, using Fermat's Theorem.
     * Assuming mod is a prime number.
     * @param x
     * @param mod
     * @return
     */
    public static int invMod(int x) {
        return modPow(x, MOD - 2);
    }

    /**
     * x / y modulo MOD global
     * @param x
     * @param y
     * @return
     */
    public static int modDivide(int x, int y) {
        return modProd(x, invMod(y));
    }

    //Copy & paste above code


} Main
import java.util.*;
import java.io.*;

public class Main {
    static int Q;
    static int N;
    static int M;
    static int[] a;
    public static void main(String[] args) {
        N = sc.nextInt();
        M = sc.nextInt();
        a = new int[M];
        for (int i = 0; i < M; i++) {
            a[i] = sc.nextInt();
        }
        int[] dp = new int[N+10];
        dp[0] = 1;
        int index = 0;
        for(int i = 0; i < N+1; i++) {
            //index s.t. a[index] >= i
            while(index < M && a[index] < i) index++;
            if(index < M && i == a[index]) continue;
            dp[i+1] += dp[i];
            dp[i+1] %= MOD;
            dp[i+2] += dp[i];
            dp[i+2] %= MOD;
        }
        // System.out.println(dp[N]);
        writer.println(dp[N]);
        writer.flush();
    }
		//Copy From HERE//


    static final FastScanner sc = new FastScanner(System.in);
    static PrintWriter writer = new PrintWriter(System.out);
    // usage
    // writer.println("sth");
    // writer.flush();

    static class FastScanner {
		Reader input;
 
		FastScanner() {
			this(System.in);
		}
 
		FastScanner(InputStream stream) {
			this.input = new BufferedReader(new InputStreamReader(stream));
		}
 
		int nextInt() {
			return (int) nextLong();
		}
 
		long nextLong() {
			try {
				int sign = 1;
				int b = input.read();
				while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				}
				if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				}
				long ret = b - '0';
				while (true) {
					b = input.read();
					if (b < '0' || '9' < b) return ret * sign;
					ret *= 10;
					ret += b - '0';
				}
			} catch (IOException e) {
				e.printStackTrace();
				return -1;
			}
		}
 
		double nextDouble() {
			try {
				double sign = 1;
				int b = input.read();
				while ((b < '0' || '9' < b) && b != '-' && b != '+') {
					b = input.read();
				}
				if (b == '-') {
					sign = -1;
					b = input.read();
				} else if (b == '+') {
					b = input.read();
				}
				double ret = b - '0';
				while (true) {
					b = input.read();
					if (b < '0' || '9' < b) break;
					ret *= 10;
					ret += b - '0';
				}
				if (b != '.') return sign * ret;
				double div = 1;
				b = input.read();
				while ('0' <= b && b <= '9') {
					ret *= 10;
					ret += b - '0';
					div *= 10;
					b = input.read();
				}
				return sign * ret / div;
			} catch (IOException e) {
				e.printStackTrace();
				return Double.NaN;
			}
		}
 
		char nextChar() {
			try {
				int b = input.read();
				while (Character.isWhitespace(b)) {
					b = input.read();
				}
				return (char) b;
			} catch (IOException e) {
				e.printStackTrace();
				return 0;
			}
		}
 
		String nextStr() {
			try {
				StringBuilder sb = new StringBuilder();
				int b = input.read();
				while (Character.isWhitespace(b)) {
					b = input.read();
				}
				while (b != -1 && !Character.isWhitespace(b)) {
					sb.append((char) b);
					b = input.read();
				}
				return sb.toString();
			} catch (IOException e) {
				e.printStackTrace();
				return "";
			}
		}
	}

	//COPY ABOVE HERE


    //Copy & paste below codes
    public static final int MOD = 1_000_000_007;
    public static int[] fact;
    public static int[] invfact;

    /**
     * 
     * @param n Calculate factorials/inverse factorials for x = [0,n]
     */
    public static void preCalcFactorials(int n) {
        fact = new int[n + 1];
        invfact = new int[n + 1];
        fact[0] = 1;
        invfact[0] = 1;
        for (int i = 1; i < n + 1; i++) {
            fact[i] = modProd(i, fact[i-1]);
            int inv = invMod(i);
            invfact[i] = modProd(inv, invfact[i-1]);
        }
    }

    public static int properMod(int x) {
        int ans = x%MOD;
        if (ans < 0) ans += MOD;
        return ans;
    }

    /**
     * preCalcFactorials() should be executed beforehand.
     * Calculate nCm modulo to global MOD.
     * @param n
     * @param m
     * @return
     */
    public static int combMod(int n, int m) {
        int ans = modProd(fact[n], invfact[n-m]);
        ans = modProd(ans, invfact[m]);
        return ans;
    }
    /**
     * Calculate a product of 2 integers modulo to mod
     * @param x
     * @param y
     * @param mod modulo
     * @return
     */
    public static int modProd(int x, int y) {
        long ans = ((long) x) * ((long) y); //prevent overflow
        ans %= MOD;
        if (ans < 0) ans += MOD;
        return (int) ans;
    }
    /**
     * Calculate a power of integer modulo to mod
     * @param x
     * @param pow
     * @param mod
     * @return
     */
    public static int modPow(int x, int pow) {
        if (pow == 0) return 1;
        int y = modProd(x,x);
        int ans; 
        if (pow % 2 == 1) {
            ans = x;
        } else {
            ans = 1;
        }
        ans = modProd(ans, modPow(y, pow/2));
        return ans;
    }
    /**
     * Calculate a inverse of an integer modulo to mod, using Fermat's Theorem.
     * Assuming mod is a prime number.
     * @param x
     * @param mod
     * @return
     */
    public static int invMod(int x) {
        return modPow(x, MOD - 2);
    }

    /**
     * x / y modulo MOD global
     * @param x
     * @param y
     * @return
     */
    public static int modDivide(int x, int y) {
        return modProd(x, invMod(y));
    }

    //Copy & paste above code


}
