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

public final class Main {

    private final static boolean USE_FILE_IO = false;
    private final static int m = 1_000_000_007;

    void solve() throws java.lang.Exception {
        int n = ri();
        int[] a = ria();
        int k = a.length;
        int s1 = 0, s2 = 1;
        int j = 0;
        for (int i=1; i<=n; i++) {
            int s3 = 0;
            if (j<k && i==a[j]) j++;
            else s3 = (s1 + s2) % m;
            s1 = s2;
            s2 = s3;
        }
        wr(s2);
    }

    long diff(long b, long x, long l, long u) {
        return (x-b) * u - (u - b) * l;
    }

    public static void main(String[] args) throws java.lang.Exception {
        Reader reader = null;
        Writer writer = null;
        try {
            if (USE_FILE_IO) {
                reader = new Reader(new FileInputStream("input.txt"));
                writer = new Writer(new FileOutputStream("output.txt"));
            } else {
                reader = new Reader(System.in);
                writer = new Writer(System.out);
            }            
            new Main(reader, writer).solve();
        } finally {
            if (reader != null)
                reader.close();
            if (writer != null)
                writer.close();
        }
    }

    Reader reader;
    Writer writer;

    Main(Reader reader, Writer writer) {
        this.reader = reader;
        this.writer = writer;
    }

    int ri() throws java.lang.Exception {
        return reader.nextInt();
    }

    int[] ria() throws java.lang.Exception {
        int n = ri();
        int[] a = new int[n];
        for (int i=0; i<n; i++) a[i] = ri();
        return a;
    }

    long rl() throws java.lang.Exception {
        return reader.nextLong();
    }

    long[] rla() throws java.lang.Exception {
        int n = ri();
        long[] a = new long[n];
        for (int i=0; i<n; i++) a[i] = rl();
        return a;
    }

    double rd() throws java.lang.Exception {
        return reader.nextDouble();
    }

    String rs() {
        return reader.nextToken();
    }

    String rline()  throws java.lang.Exception {
        return reader.nextLine();
    }

    void wr(int x)  throws java.lang.Exception {
        writer.write(x);
    }

    void wr(int[] a)  throws java.lang.Exception {
        for (int i=0; i<a.length; i++) {
            if (i!=0) wr(" ");
            wr(a[i]);
        }
        wl();
    }

    void wr(long x)  throws java.lang.Exception {
        writer.write(x);
    }

    void wr(long[] a)  throws java.lang.Exception {
        for (int i=0; i<a.length; i++) {
            if (i!=0) wr(" ");
            wr(a[i]);
        }
        wl();
    }

    void wr(double x)  throws java.lang.Exception {
        writer.write(x);
    }    

    void wr(String s)  throws java.lang.Exception {
        writer.write(s);
    }

    void wl()  throws java.lang.Exception {
        writer.writeLine();
    }

    void wline(String s)  throws java.lang.Exception {
        writer.writeLine(s);
    }

    static class Writer {
        BufferedWriter bw;

        public Writer(OutputStream out) {
            bw = new BufferedWriter(new OutputStreamWriter(out));
        }

        void write(String s) throws java.lang.Exception {
            bw.write(s);
        }

        void write(int x) throws java.lang.Exception {
            write(String.valueOf(x));
        }

        void write(long x) throws java.lang.Exception {
            write(String.valueOf(x));
        }

        void write(double x) throws java.lang.Exception {
            write(String.valueOf(x));
        }

        void write(char c) throws java.lang.Exception {
            bw.write(c);
        }

        void newLine() throws java.lang.Exception {
            bw.newLine();
        }

        void writeLine(String s) throws java.lang.Exception {
            write(s);
            newLine();
        }

        void writeLine(int n) throws java.lang.Exception {
            writeLine(String.valueOf(n));
        }

        void writeLine(long n) throws java.lang.Exception {
            writeLine(String.valueOf(n));
        }
        
        void writeLine() throws java.lang.Exception {
            writeLine("");
        }

        void close() throws java.lang.Exception {
            bw.flush();
            bw.close();
        }
    }

    static class Reader {
        BufferedReader br;
        StringTokenizer st;

        public Reader(InputStream in) {
            br = new BufferedReader(new InputStreamReader(in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String[] nextTokens(int n) {
            String[] a = new String[n];
            for (int i=0; i<n; i++) {
                a[i] = nextToken();
            }
            return a;
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        int[] nextInts(int n) {
            int[] a = new int[n];
            for (int i=0; i<n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        long[] nextLongs(int n) {
            long[] a = new long[n];
            for (int i=0; i<n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        void close() throws java.lang.Exception {
            br.close();
        }
    }
} import java.util.*; util.* java import java.io.*; io.* java import java.lang.*; lang.* java public final class Main {

    private final static boolean USE_FILE_IO = false;
    private final static int m = 1_000_000_007;

    void solve() throws java.lang.Exception {
        int n = ri();
        int[] a = ria();
        int k = a.length;
        int s1 = 0, s2 = 1;
        int j = 0;
        for (int i=1; i<=n; i++) {
            int s3 = 0;
            if (j<k && i==a[j]) j++;
            else s3 = (s1 + s2) % m;
            s1 = s2;
            s2 = s3;
        }
        wr(s2);
    }

    long diff(long b, long x, long l, long u) {
        return (x-b) * u - (u - b) * l;
    }

    public static void main(String[] args) throws java.lang.Exception {
        Reader reader = null;
        Writer writer = null;
        try {
            if (USE_FILE_IO) {
                reader = new Reader(new FileInputStream("input.txt"));
                writer = new Writer(new FileOutputStream("output.txt"));
            } else {
                reader = new Reader(System.in);
                writer = new Writer(System.out);
            }            
            new Main(reader, writer).solve();
        } finally {
            if (reader != null)
                reader.close();
            if (writer != null)
                writer.close();
        }
    }

    Reader reader;
    Writer writer;

    Main(Reader reader, Writer writer) {
        this.reader = reader;
        this.writer = writer;
    }

    int ri() throws java.lang.Exception {
        return reader.nextInt();
    }

    int[] ria() throws java.lang.Exception {
        int n = ri();
        int[] a = new int[n];
        for (int i=0; i<n; i++) a[i] = ri();
        return a;
    }

    long rl() throws java.lang.Exception {
        return reader.nextLong();
    }

    long[] rla() throws java.lang.Exception {
        int n = ri();
        long[] a = new long[n];
        for (int i=0; i<n; i++) a[i] = rl();
        return a;
    }

    double rd() throws java.lang.Exception {
        return reader.nextDouble();
    }

    String rs() {
        return reader.nextToken();
    }

    String rline()  throws java.lang.Exception {
        return reader.nextLine();
    }

    void wr(int x)  throws java.lang.Exception {
        writer.write(x);
    }

    void wr(int[] a)  throws java.lang.Exception {
        for (int i=0; i<a.length; i++) {
            if (i!=0) wr(" ");
            wr(a[i]);
        }
        wl();
    }

    void wr(long x)  throws java.lang.Exception {
        writer.write(x);
    }

    void wr(long[] a)  throws java.lang.Exception {
        for (int i=0; i<a.length; i++) {
            if (i!=0) wr(" ");
            wr(a[i]);
        }
        wl();
    }

    void wr(double x)  throws java.lang.Exception {
        writer.write(x);
    }    

    void wr(String s)  throws java.lang.Exception {
        writer.write(s);
    }

    void wl()  throws java.lang.Exception {
        writer.writeLine();
    }

    void wline(String s)  throws java.lang.Exception {
        writer.writeLine(s);
    }

    static class Writer {
        BufferedWriter bw;

        public Writer(OutputStream out) {
            bw = new BufferedWriter(new OutputStreamWriter(out));
        }

        void write(String s) throws java.lang.Exception {
            bw.write(s);
        }

        void write(int x) throws java.lang.Exception {
            write(String.valueOf(x));
        }

        void write(long x) throws java.lang.Exception {
            write(String.valueOf(x));
        }

        void write(double x) throws java.lang.Exception {
            write(String.valueOf(x));
        }

        void write(char c) throws java.lang.Exception {
            bw.write(c);
        }

        void newLine() throws java.lang.Exception {
            bw.newLine();
        }

        void writeLine(String s) throws java.lang.Exception {
            write(s);
            newLine();
        }

        void writeLine(int n) throws java.lang.Exception {
            writeLine(String.valueOf(n));
        }

        void writeLine(long n) throws java.lang.Exception {
            writeLine(String.valueOf(n));
        }
        
        void writeLine() throws java.lang.Exception {
            writeLine("");
        }

        void close() throws java.lang.Exception {
            bw.flush();
            bw.close();
        }
    }

    static class Reader {
        BufferedReader br;
        StringTokenizer st;

        public Reader(InputStream in) {
            br = new BufferedReader(new InputStreamReader(in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String[] nextTokens(int n) {
            String[] a = new String[n];
            for (int i=0; i<n; i++) {
                a[i] = nextToken();
            }
            return a;
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        int[] nextInts(int n) {
            int[] a = new int[n];
            for (int i=0; i<n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        long[] nextLongs(int n) {
            long[] a = new long[n];
            for (int i=0; i<n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        void close() throws java.lang.Exception {
            br.close();
        }
    }
} Main private final static boolean USE_FILE_IO = false; USE_FILE_IO false private final static int m = 1_000_000_007; m 1_000_000_007 Reader reader; reader Writer writer; writer void solve() throws java.lang.Exception {
        int n = ri();
        int[] a = ria();
        int k = a.length;
        int s1 = 0, s2 = 1;
        int j = 0;
        for (int i=1; i<=n; i++) {
            int s3 = 0;
            if (j<k && i==a[j]) j++;
            else s3 = (s1 + s2) % m;
            s1 = s2;
            s2 = s3;
        }
        wr(s2);
    } solve {
        int n = ri();
        int[] a = ria();
        int k = a.length;
        int s1 = 0, s2 = 1;
        int j = 0;
        for (int i=1; i<=n; i++) {
            int s3 = 0;
            if (j<k && i==a[j]) j++;
            else s3 = (s1 + s2) % m;
            s1 = s2;
            s2 = s3;
        }
        wr(s2);
    } int n = ri(); n ri() ri int[] a = ria(); a ria() ria int k = a.length; k a.length a a.length int s1 = 0 s1 0 s2 = 1; s2 1 int j = 0; j 0 for (int i=1; i<=n; i++) {
            int s3 = 0;
            if (j<k && i==a[j]) j++;
            else s3 = (s1 + s2) % m;
            s1 = s2;
            s2 = s3;
        } int i=1; int i=1; i 1 i<=n i n i++ i++ i {
            int s3 = 0;
            if (j<k && i==a[j]) j++;
            else s3 = (s1 + s2) % m;
            s1 = s2;
            s2 = s3;
        } {
            int s3 = 0;
            if (j<k && i==a[j]) j++;
            else s3 = (s1 + s2) % m;
            s1 = s2;
            s2 = s3;
        } int s3 = 0; s3 0 if (j<k && i==a[j]) j++;
            else s3 = (s1 + s2) % m; j<k && i==a[j] j<k j k i==a[j] i a[j] a j j++ j s3 = (s1 + s2) % m s3 (s1 + s2) % m (s1 + s2) s1 s2 m s1 = s2 s1 s2 s2 = s3 s2 s3 wr(s2) wr s2 long diff(long b, long x, long l, long u) {
        return (x-b) * u - (u - b) * l;
    } diff {
        return (x-b) * u - (u - b) * l;
    } return (x-b) * u - (u - b) * l; (x-b) * u - (u - b) * l (x-b) * u (x-b) x b u (u - b) * l (u - b) u b l long b b long x x long l l long u u public static void main(String[] args) throws java.lang.Exception {
        Reader reader = null;
        Writer writer = null;
        try {
            if (USE_FILE_IO) {
                reader = new Reader(new FileInputStream("input.txt"));
                writer = new Writer(new FileOutputStream("output.txt"));
            } else {
                reader = new Reader(System.in);
                writer = new Writer(System.out);
            }            
            new Main(reader, writer).solve();
        } finally {
            if (reader != null)
                reader.close();
            if (writer != null)
                writer.close();
        }
    } main {
        Reader reader = null;
        Writer writer = null;
        try {
            if (USE_FILE_IO) {
                reader = new Reader(new FileInputStream("input.txt"));
                writer = new Writer(new FileOutputStream("output.txt"));
            } else {
                reader = new Reader(System.in);
                writer = new Writer(System.out);
            }            
            new Main(reader, writer).solve();
        } finally {
            if (reader != null)
                reader.close();
            if (writer != null)
                writer.close();
        }
    } Reader reader = null; reader null Writer writer = null; writer null try {
            if (USE_FILE_IO) {
                reader = new Reader(new FileInputStream("input.txt"));
                writer = new Writer(new FileOutputStream("output.txt"));
            } else {
                reader = new Reader(System.in);
                writer = new Writer(System.out);
            }            
            new Main(reader, writer).solve();
        } finally {
            if (reader != null)
                reader.close();
            if (writer != null)
                writer.close();
        } {
            if (reader != null)
                reader.close();
            if (writer != null)
                writer.close();
        } if (reader != null)
                reader.close(); reader != null reader null reader.close() reader.close reader if (writer != null)
                writer.close(); writer != null writer null writer.close() writer.close writer {
            if (USE_FILE_IO) {
                reader = new Reader(new FileInputStream("input.txt"));
                writer = new Writer(new FileOutputStream("output.txt"));
            } else {
                reader = new Reader(System.in);
                writer = new Writer(System.out);
            }            
            new Main(reader, writer).solve();
        } if (USE_FILE_IO) {
                reader = new Reader(new FileInputStream("input.txt"));
                writer = new Writer(new FileOutputStream("output.txt"));
            } else {
                reader = new Reader(System.in);
                writer = new Writer(System.out);
            } USE_FILE_IO {
                reader = new Reader(new FileInputStream("input.txt"));
                writer = new Writer(new FileOutputStream("output.txt"));
            } reader = new Reader(new FileInputStream("input.txt")) reader new Reader(new FileInputStream("input.txt")) writer = new Writer(new FileOutputStream("output.txt")) writer new Writer(new FileOutputStream("output.txt")) {
                reader = new Reader(System.in);
                writer = new Writer(System.out);
            } reader = new Reader(System.in) reader new Reader(System.in) writer = new Writer(System.out) writer new Writer(System.out) new Main(reader, writer).solve() new Main(reader, writer).solve new Main(reader, writer) String[] args args Main(Reader reader, Writer writer) {
        this.reader = reader;
        this.writer = writer;
    } Main {
        this.reader = reader;
        this.writer = writer;
    } this.reader = reader this.reader this this.reader reader this.writer = writer this.writer this this.writer writer Reader reader reader Writer writer writer int ri() throws java.lang.Exception {
        return reader.nextInt();
    } ri {
        return reader.nextInt();
    } return reader.nextInt(); reader.nextInt() reader.nextInt reader int[] ria() throws java.lang.Exception {
        int n = ri();
        int[] a = new int[n];
        for (int i=0; i<n; i++) a[i] = ri();
        return a;
    } ria {
        int n = ri();
        int[] a = new int[n];
        for (int i=0; i<n; i++) a[i] = ri();
        return a;
    } int n = ri(); n ri() ri int[] a = new int[n]; a new int[n] n for (int i=0; i<n; i++) a[i] = ri(); int i=0; int i=0; i 0 i<n i n i++ i++ i a[i] = ri(); a[i] = ri() a[i] a i ri() ri return a; a long rl() throws java.lang.Exception {
        return reader.nextLong();
    } rl {
        return reader.nextLong();
    } return reader.nextLong(); reader.nextLong() reader.nextLong reader long[] rla() throws java.lang.Exception {
        int n = ri();
        long[] a = new long[n];
        for (int i=0; i<n; i++) a[i] = rl();
        return a;
    } rla {
        int n = ri();
        long[] a = new long[n];
        for (int i=0; i<n; i++) a[i] = rl();
        return a;
    } int n = ri(); n ri() ri long[] a = new long[n]; a new long[n] n for (int i=0; i<n; i++) a[i] = rl(); int i=0; int i=0; i 0 i<n i n i++ i++ i a[i] = rl(); a[i] = rl() a[i] a i rl() rl return a; a double rd() throws java.lang.Exception {
        return reader.nextDouble();
    } rd {
        return reader.nextDouble();
    } return reader.nextDouble(); reader.nextDouble() reader.nextDouble reader String rs() {
        return reader.nextToken();
    } rs {
        return reader.nextToken();
    } return reader.nextToken(); reader.nextToken() reader.nextToken reader String rline()  throws java.lang.Exception {
        return reader.nextLine();
    } rline {
        return reader.nextLine();
    } return reader.nextLine(); reader.nextLine() reader.nextLine reader void wr(int x)  throws java.lang.Exception {
        writer.write(x);
    } wr {
        writer.write(x);
    } writer.write(x) writer.write writer x int x x void wr(int[] a)  throws java.lang.Exception {
        for (int i=0; i<a.length; i++) {
            if (i!=0) wr(" ");
            wr(a[i]);
        }
        wl();
    } wr {
        for (int i=0; i<a.length; i++) {
            if (i!=0) wr(" ");
            wr(a[i]);
        }
        wl();
    } for (int i=0; i<a.length; i++) {
            if (i!=0) wr(" ");
            wr(a[i]);
        } int i=0; int i=0; i 0 i<a.length i a.length a a.length i++ i++ i {
            if (i!=0) wr(" ");
            wr(a[i]);
        } {
            if (i!=0) wr(" ");
            wr(a[i]);
        } if (i!=0) wr(" "); i!=0 i 0 wr(" ") wr " " wr(a[i]) wr a[i] a i wl() wl int[] a a void wr(long x)  throws java.lang.Exception {
        writer.write(x);
    } wr {
        writer.write(x);
    } writer.write(x) writer.write writer x long x x void wr(long[] a)  throws java.lang.Exception {
        for (int i=0; i<a.length; i++) {
            if (i!=0) wr(" ");
            wr(a[i]);
        }
        wl();
    } wr {
        for (int i=0; i<a.length; i++) {
            if (i!=0) wr(" ");
            wr(a[i]);
        }
        wl();
    } for (int i=0; i<a.length; i++) {
            if (i!=0) wr(" ");
            wr(a[i]);
        } int i=0; int i=0; i 0 i<a.length i a.length a a.length i++ i++ i {
            if (i!=0) wr(" ");
            wr(a[i]);
        } {
            if (i!=0) wr(" ");
            wr(a[i]);
        } if (i!=0) wr(" "); i!=0 i 0 wr(" ") wr " " wr(a[i]) wr a[i] a i wl() wl long[] a a void wr(double x)  throws java.lang.Exception {
        writer.write(x);
    } wr {
        writer.write(x);
    } writer.write(x) writer.write writer x double x x void wr(String s)  throws java.lang.Exception {
        writer.write(s);
    } wr {
        writer.write(s);
    } writer.write(s) writer.write writer s String s s void wl()  throws java.lang.Exception {
        writer.writeLine();
    } wl {
        writer.writeLine();
    } writer.writeLine() writer.writeLine writer void wline(String s)  throws java.lang.Exception {
        writer.writeLine(s);
    } wline {
        writer.writeLine(s);
    } writer.writeLine(s) writer.writeLine writer s String s s static class Writer {
        BufferedWriter bw;

        public Writer(OutputStream out) {
            bw = new BufferedWriter(new OutputStreamWriter(out));
        }

        void write(String s) throws java.lang.Exception {
            bw.write(s);
        }

        void write(int x) throws java.lang.Exception {
            write(String.valueOf(x));
        }

        void write(long x) throws java.lang.Exception {
            write(String.valueOf(x));
        }

        void write(double x) throws java.lang.Exception {
            write(String.valueOf(x));
        }

        void write(char c) throws java.lang.Exception {
            bw.write(c);
        }

        void newLine() throws java.lang.Exception {
            bw.newLine();
        }

        void writeLine(String s) throws java.lang.Exception {
            write(s);
            newLine();
        }

        void writeLine(int n) throws java.lang.Exception {
            writeLine(String.valueOf(n));
        }

        void writeLine(long n) throws java.lang.Exception {
            writeLine(String.valueOf(n));
        }
        
        void writeLine() throws java.lang.Exception {
            writeLine("");
        }

        void close() throws java.lang.Exception {
            bw.flush();
            bw.close();
        }
    } Writer BufferedWriter bw; bw public Writer(OutputStream out) {
            bw = new BufferedWriter(new OutputStreamWriter(out));
        } Writer {
            bw = new BufferedWriter(new OutputStreamWriter(out));
        } bw = new BufferedWriter(new OutputStreamWriter(out)) bw new BufferedWriter(new OutputStreamWriter(out)) OutputStream out out void write(String s) throws java.lang.Exception {
            bw.write(s);
        } write {
            bw.write(s);
        } bw.write(s) bw.write bw s String s s void write(int x) throws java.lang.Exception {
            write(String.valueOf(x));
        } write {
            write(String.valueOf(x));
        } write(String.valueOf(x)) write String.valueOf(x) String.valueOf String x int x x void write(long x) throws java.lang.Exception {
            write(String.valueOf(x));
        } write {
            write(String.valueOf(x));
        } write(String.valueOf(x)) write String.valueOf(x) String.valueOf String x long x x void write(double x) throws java.lang.Exception {
            write(String.valueOf(x));
        } write {
            write(String.valueOf(x));
        } write(String.valueOf(x)) write String.valueOf(x) String.valueOf String x double x x void write(char c) throws java.lang.Exception {
            bw.write(c);
        } write {
            bw.write(c);
        } bw.write(c) bw.write bw c char c c void newLine() throws java.lang.Exception {
            bw.newLine();
        } newLine {
            bw.newLine();
        } bw.newLine() bw.newLine bw void writeLine(String s) throws java.lang.Exception {
            write(s);
            newLine();
        } writeLine {
            write(s);
            newLine();
        } write(s) write s newLine() newLine String s s void writeLine(int n) throws java.lang.Exception {
            writeLine(String.valueOf(n));
        } writeLine {
            writeLine(String.valueOf(n));
        } writeLine(String.valueOf(n)) writeLine String.valueOf(n) String.valueOf String n int n n void writeLine(long n) throws java.lang.Exception {
            writeLine(String.valueOf(n));
        } writeLine {
            writeLine(String.valueOf(n));
        } writeLine(String.valueOf(n)) writeLine String.valueOf(n) String.valueOf String n long n n void writeLine() throws java.lang.Exception {
            writeLine("");
        } writeLine {
            writeLine("");
        } writeLine("") writeLine "" void close() throws java.lang.Exception {
            bw.flush();
            bw.close();
        } close {
            bw.flush();
            bw.close();
        } bw.flush() bw.flush bw bw.close() bw.close bw static class Reader {
        BufferedReader br;
        StringTokenizer st;

        public Reader(InputStream in) {
            br = new BufferedReader(new InputStreamReader(in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String[] nextTokens(int n) {
            String[] a = new String[n];
            for (int i=0; i<n; i++) {
                a[i] = nextToken();
            }
            return a;
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        int[] nextInts(int n) {
            int[] a = new int[n];
            for (int i=0; i<n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        long[] nextLongs(int n) {
            long[] a = new long[n];
            for (int i=0; i<n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        void close() throws java.lang.Exception {
            br.close();
        }
    } Reader BufferedReader br; br StringTokenizer st; st public Reader(InputStream in) {
            br = new BufferedReader(new InputStreamReader(in));
        } Reader {
            br = new BufferedReader(new InputStreamReader(in));
        } br = new BufferedReader(new InputStreamReader(in)) br new BufferedReader(new InputStreamReader(in)) InputStream in in String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } nextToken {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                } catch (IOException e) {
                    e.printStackTrace();
                } IOException e {
                    e.printStackTrace();
                } e.printStackTrace() e.printStackTrace e {
                    st = new StringTokenizer(br.readLine());
                } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st String[] nextTokens(int n) {
            String[] a = new String[n];
            for (int i=0; i<n; i++) {
                a[i] = nextToken();
            }
            return a;
        } nextTokens {
            String[] a = new String[n];
            for (int i=0; i<n; i++) {
                a[i] = nextToken();
            }
            return a;
        } String[] a = new String[n]; a new String[n] n for (int i=0; i<n; i++) {
                a[i] = nextToken();
            } int i=0; int i=0; i 0 i<n i n i++ i++ i {
                a[i] = nextToken();
            } {
                a[i] = nextToken();
            } a[i] = nextToken() a[i] a i nextToken() nextToken return a; a int n n int nextInt() {
            return Integer.parseInt(nextToken());
        } nextInt {
            return Integer.parseInt(nextToken());
        } return Integer.parseInt(nextToken()); Integer.parseInt(nextToken()) Integer.parseInt Integer nextToken() nextToken int[] nextInts(int n) {
            int[] a = new int[n];
            for (int i=0; i<n; i++) {
                a[i] = nextInt();
            }
            return a;
        } nextInts {
            int[] a = new int[n];
            for (int i=0; i<n; i++) {
                a[i] = nextInt();
            }
            return a;
        } int[] a = new int[n]; a new int[n] n for (int i=0; i<n; i++) {
                a[i] = nextInt();
            } int i=0; int i=0; i 0 i<n i n i++ i++ i {
                a[i] = nextInt();
            } {
                a[i] = nextInt();
            } a[i] = nextInt() a[i] a i nextInt() nextInt return a; a int n n long nextLong() {
            return Long.parseLong(nextToken());
        } nextLong {
            return Long.parseLong(nextToken());
        } return Long.parseLong(nextToken()); Long.parseLong(nextToken()) Long.parseLong Long nextToken() nextToken long[] nextLongs(int n) {
            long[] a = new long[n];
            for (int i=0; i<n; i++) {
                a[i] = nextInt();
            }
            return a;
        } nextLongs {
            long[] a = new long[n];
            for (int i=0; i<n; i++) {
                a[i] = nextInt();
            }
            return a;
        } long[] a = new long[n]; a new long[n] n for (int i=0; i<n; i++) {
                a[i] = nextInt();
            } int i=0; int i=0; i 0 i<n i n i++ i++ i {
                a[i] = nextInt();
            } {
                a[i] = nextInt();
            } a[i] = nextInt() a[i] a i nextInt() nextInt return a; a int n n double nextDouble() {
            return Double.parseDouble(nextToken());
        } nextDouble {
            return Double.parseDouble(nextToken());
        } return Double.parseDouble(nextToken()); Double.parseDouble(nextToken()) Double.parseDouble Double nextToken() nextToken String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        } nextLine {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        } String str = ""; str "" try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } IOException e {
                e.printStackTrace();
            } e.printStackTrace() e.printStackTrace e {
                str = br.readLine();
            } str = br.readLine() str br.readLine() br.readLine br return str; str void close() throws java.lang.Exception {
            br.close();
        } close {
            br.close();
        } br.close() br.close br public final class Main {

    private final static boolean USE_FILE_IO = false;
    private final static int m = 1_000_000_007;

    void solve() throws java.lang.Exception {
        int n = ri();
        int[] a = ria();
        int k = a.length;
        int s1 = 0, s2 = 1;
        int j = 0;
        for (int i=1; i<=n; i++) {
            int s3 = 0;
            if (j<k && i==a[j]) j++;
            else s3 = (s1 + s2) % m;
            s1 = s2;
            s2 = s3;
        }
        wr(s2);
    }

    long diff(long b, long x, long l, long u) {
        return (x-b) * u - (u - b) * l;
    }

    public static void main(String[] args) throws java.lang.Exception {
        Reader reader = null;
        Writer writer = null;
        try {
            if (USE_FILE_IO) {
                reader = new Reader(new FileInputStream("input.txt"));
                writer = new Writer(new FileOutputStream("output.txt"));
            } else {
                reader = new Reader(System.in);
                writer = new Writer(System.out);
            }            
            new Main(reader, writer).solve();
        } finally {
            if (reader != null)
                reader.close();
            if (writer != null)
                writer.close();
        }
    }

    Reader reader;
    Writer writer;

    Main(Reader reader, Writer writer) {
        this.reader = reader;
        this.writer = writer;
    }

    int ri() throws java.lang.Exception {
        return reader.nextInt();
    }

    int[] ria() throws java.lang.Exception {
        int n = ri();
        int[] a = new int[n];
        for (int i=0; i<n; i++) a[i] = ri();
        return a;
    }

    long rl() throws java.lang.Exception {
        return reader.nextLong();
    }

    long[] rla() throws java.lang.Exception {
        int n = ri();
        long[] a = new long[n];
        for (int i=0; i<n; i++) a[i] = rl();
        return a;
    }

    double rd() throws java.lang.Exception {
        return reader.nextDouble();
    }

    String rs() {
        return reader.nextToken();
    }

    String rline()  throws java.lang.Exception {
        return reader.nextLine();
    }

    void wr(int x)  throws java.lang.Exception {
        writer.write(x);
    }

    void wr(int[] a)  throws java.lang.Exception {
        for (int i=0; i<a.length; i++) {
            if (i!=0) wr(" ");
            wr(a[i]);
        }
        wl();
    }

    void wr(long x)  throws java.lang.Exception {
        writer.write(x);
    }

    void wr(long[] a)  throws java.lang.Exception {
        for (int i=0; i<a.length; i++) {
            if (i!=0) wr(" ");
            wr(a[i]);
        }
        wl();
    }

    void wr(double x)  throws java.lang.Exception {
        writer.write(x);
    }    

    void wr(String s)  throws java.lang.Exception {
        writer.write(s);
    }

    void wl()  throws java.lang.Exception {
        writer.writeLine();
    }

    void wline(String s)  throws java.lang.Exception {
        writer.writeLine(s);
    }

    static class Writer {
        BufferedWriter bw;

        public Writer(OutputStream out) {
            bw = new BufferedWriter(new OutputStreamWriter(out));
        }

        void write(String s) throws java.lang.Exception {
            bw.write(s);
        }

        void write(int x) throws java.lang.Exception {
            write(String.valueOf(x));
        }

        void write(long x) throws java.lang.Exception {
            write(String.valueOf(x));
        }

        void write(double x) throws java.lang.Exception {
            write(String.valueOf(x));
        }

        void write(char c) throws java.lang.Exception {
            bw.write(c);
        }

        void newLine() throws java.lang.Exception {
            bw.newLine();
        }

        void writeLine(String s) throws java.lang.Exception {
            write(s);
            newLine();
        }

        void writeLine(int n) throws java.lang.Exception {
            writeLine(String.valueOf(n));
        }

        void writeLine(long n) throws java.lang.Exception {
            writeLine(String.valueOf(n));
        }
        
        void writeLine() throws java.lang.Exception {
            writeLine("");
        }

        void close() throws java.lang.Exception {
            bw.flush();
            bw.close();
        }
    }

    static class Reader {
        BufferedReader br;
        StringTokenizer st;

        public Reader(InputStream in) {
            br = new BufferedReader(new InputStreamReader(in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String[] nextTokens(int n) {
            String[] a = new String[n];
            for (int i=0; i<n; i++) {
                a[i] = nextToken();
            }
            return a;
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        int[] nextInts(int n) {
            int[] a = new int[n];
            for (int i=0; i<n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        long[] nextLongs(int n) {
            long[] a = new long[n];
            for (int i=0; i<n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        void close() throws java.lang.Exception {
            br.close();
        }
    }
} public final class Main {

    private final static boolean USE_FILE_IO = false;
    private final static int m = 1_000_000_007;

    void solve() throws java.lang.Exception {
        int n = ri();
        int[] a = ria();
        int k = a.length;
        int s1 = 0, s2 = 1;
        int j = 0;
        for (int i=1; i<=n; i++) {
            int s3 = 0;
            if (j<k && i==a[j]) j++;
            else s3 = (s1 + s2) % m;
            s1 = s2;
            s2 = s3;
        }
        wr(s2);
    }

    long diff(long b, long x, long l, long u) {
        return (x-b) * u - (u - b) * l;
    }

    public static void main(String[] args) throws java.lang.Exception {
        Reader reader = null;
        Writer writer = null;
        try {
            if (USE_FILE_IO) {
                reader = new Reader(new FileInputStream("input.txt"));
                writer = new Writer(new FileOutputStream("output.txt"));
            } else {
                reader = new Reader(System.in);
                writer = new Writer(System.out);
            }            
            new Main(reader, writer).solve();
        } finally {
            if (reader != null)
                reader.close();
            if (writer != null)
                writer.close();
        }
    }

    Reader reader;
    Writer writer;

    Main(Reader reader, Writer writer) {
        this.reader = reader;
        this.writer = writer;
    }

    int ri() throws java.lang.Exception {
        return reader.nextInt();
    }

    int[] ria() throws java.lang.Exception {
        int n = ri();
        int[] a = new int[n];
        for (int i=0; i<n; i++) a[i] = ri();
        return a;
    }

    long rl() throws java.lang.Exception {
        return reader.nextLong();
    }

    long[] rla() throws java.lang.Exception {
        int n = ri();
        long[] a = new long[n];
        for (int i=0; i<n; i++) a[i] = rl();
        return a;
    }

    double rd() throws java.lang.Exception {
        return reader.nextDouble();
    }

    String rs() {
        return reader.nextToken();
    }

    String rline()  throws java.lang.Exception {
        return reader.nextLine();
    }

    void wr(int x)  throws java.lang.Exception {
        writer.write(x);
    }

    void wr(int[] a)  throws java.lang.Exception {
        for (int i=0; i<a.length; i++) {
            if (i!=0) wr(" ");
            wr(a[i]);
        }
        wl();
    }

    void wr(long x)  throws java.lang.Exception {
        writer.write(x);
    }

    void wr(long[] a)  throws java.lang.Exception {
        for (int i=0; i<a.length; i++) {
            if (i!=0) wr(" ");
            wr(a[i]);
        }
        wl();
    }

    void wr(double x)  throws java.lang.Exception {
        writer.write(x);
    }    

    void wr(String s)  throws java.lang.Exception {
        writer.write(s);
    }

    void wl()  throws java.lang.Exception {
        writer.writeLine();
    }

    void wline(String s)  throws java.lang.Exception {
        writer.writeLine(s);
    }

    static class Writer {
        BufferedWriter bw;

        public Writer(OutputStream out) {
            bw = new BufferedWriter(new OutputStreamWriter(out));
        }

        void write(String s) throws java.lang.Exception {
            bw.write(s);
        }

        void write(int x) throws java.lang.Exception {
            write(String.valueOf(x));
        }

        void write(long x) throws java.lang.Exception {
            write(String.valueOf(x));
        }

        void write(double x) throws java.lang.Exception {
            write(String.valueOf(x));
        }

        void write(char c) throws java.lang.Exception {
            bw.write(c);
        }

        void newLine() throws java.lang.Exception {
            bw.newLine();
        }

        void writeLine(String s) throws java.lang.Exception {
            write(s);
            newLine();
        }

        void writeLine(int n) throws java.lang.Exception {
            writeLine(String.valueOf(n));
        }

        void writeLine(long n) throws java.lang.Exception {
            writeLine(String.valueOf(n));
        }
        
        void writeLine() throws java.lang.Exception {
            writeLine("");
        }

        void close() throws java.lang.Exception {
            bw.flush();
            bw.close();
        }
    }

    static class Reader {
        BufferedReader br;
        StringTokenizer st;

        public Reader(InputStream in) {
            br = new BufferedReader(new InputStreamReader(in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String[] nextTokens(int n) {
            String[] a = new String[n];
            for (int i=0; i<n; i++) {
                a[i] = nextToken();
            }
            return a;
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        int[] nextInts(int n) {
            int[] a = new int[n];
            for (int i=0; i<n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        long[] nextLongs(int n) {
            long[] a = new long[n];
            for (int i=0; i<n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        void close() throws java.lang.Exception {
            br.close();
        }
    }
} Main
import java.util.*;
import java.io.*;
import java.lang.*;

public final class Main {

    private final static boolean USE_FILE_IO = false;
    private final static int m = 1_000_000_007;

    void solve() throws java.lang.Exception {
        int n = ri();
        int[] a = ria();
        int k = a.length;
        int s1 = 0, s2 = 1;
        int j = 0;
        for (int i=1; i<=n; i++) {
            int s3 = 0;
            if (j<k && i==a[j]) j++;
            else s3 = (s1 + s2) % m;
            s1 = s2;
            s2 = s3;
        }
        wr(s2);
    }

    long diff(long b, long x, long l, long u) {
        return (x-b) * u - (u - b) * l;
    }

    public static void main(String[] args) throws java.lang.Exception {
        Reader reader = null;
        Writer writer = null;
        try {
            if (USE_FILE_IO) {
                reader = new Reader(new FileInputStream("input.txt"));
                writer = new Writer(new FileOutputStream("output.txt"));
            } else {
                reader = new Reader(System.in);
                writer = new Writer(System.out);
            }            
            new Main(reader, writer).solve();
        } finally {
            if (reader != null)
                reader.close();
            if (writer != null)
                writer.close();
        }
    }

    Reader reader;
    Writer writer;

    Main(Reader reader, Writer writer) {
        this.reader = reader;
        this.writer = writer;
    }

    int ri() throws java.lang.Exception {
        return reader.nextInt();
    }

    int[] ria() throws java.lang.Exception {
        int n = ri();
        int[] a = new int[n];
        for (int i=0; i<n; i++) a[i] = ri();
        return a;
    }

    long rl() throws java.lang.Exception {
        return reader.nextLong();
    }

    long[] rla() throws java.lang.Exception {
        int n = ri();
        long[] a = new long[n];
        for (int i=0; i<n; i++) a[i] = rl();
        return a;
    }

    double rd() throws java.lang.Exception {
        return reader.nextDouble();
    }

    String rs() {
        return reader.nextToken();
    }

    String rline()  throws java.lang.Exception {
        return reader.nextLine();
    }

    void wr(int x)  throws java.lang.Exception {
        writer.write(x);
    }

    void wr(int[] a)  throws java.lang.Exception {
        for (int i=0; i<a.length; i++) {
            if (i!=0) wr(" ");
            wr(a[i]);
        }
        wl();
    }

    void wr(long x)  throws java.lang.Exception {
        writer.write(x);
    }

    void wr(long[] a)  throws java.lang.Exception {
        for (int i=0; i<a.length; i++) {
            if (i!=0) wr(" ");
            wr(a[i]);
        }
        wl();
    }

    void wr(double x)  throws java.lang.Exception {
        writer.write(x);
    }    

    void wr(String s)  throws java.lang.Exception {
        writer.write(s);
    }

    void wl()  throws java.lang.Exception {
        writer.writeLine();
    }

    void wline(String s)  throws java.lang.Exception {
        writer.writeLine(s);
    }

    static class Writer {
        BufferedWriter bw;

        public Writer(OutputStream out) {
            bw = new BufferedWriter(new OutputStreamWriter(out));
        }

        void write(String s) throws java.lang.Exception {
            bw.write(s);
        }

        void write(int x) throws java.lang.Exception {
            write(String.valueOf(x));
        }

        void write(long x) throws java.lang.Exception {
            write(String.valueOf(x));
        }

        void write(double x) throws java.lang.Exception {
            write(String.valueOf(x));
        }

        void write(char c) throws java.lang.Exception {
            bw.write(c);
        }

        void newLine() throws java.lang.Exception {
            bw.newLine();
        }

        void writeLine(String s) throws java.lang.Exception {
            write(s);
            newLine();
        }

        void writeLine(int n) throws java.lang.Exception {
            writeLine(String.valueOf(n));
        }

        void writeLine(long n) throws java.lang.Exception {
            writeLine(String.valueOf(n));
        }
        
        void writeLine() throws java.lang.Exception {
            writeLine("");
        }

        void close() throws java.lang.Exception {
            bw.flush();
            bw.close();
        }
    }

    static class Reader {
        BufferedReader br;
        StringTokenizer st;

        public Reader(InputStream in) {
            br = new BufferedReader(new InputStreamReader(in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String[] nextTokens(int n) {
            String[] a = new String[n];
            for (int i=0; i<n; i++) {
                a[i] = nextToken();
            }
            return a;
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        int[] nextInts(int n) {
            int[] a = new int[n];
            for (int i=0; i<n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        long[] nextLongs(int n) {
            long[] a = new long[n];
            for (int i=0; i<n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        void close() throws java.lang.Exception {
            br.close();
        }
    }
}