import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;

public class Main {

  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    MyInput in = new MyInput(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    TaskX solver = new TaskX();
    solver.solve(1, in, out);
    out.close();
  }

  static int INF = 1 << 30;
  static long LINF = 1L << 55;
  static int MOD = 1000000007;
  static int[] mh4 = {0, -1, 1, 0};
  static int[] mw4 = {-1, 0, 0, 1};
  static int[] mh8 = {-1, -1, -1, 0, 0, 1, 1, 1};
  static int[] mw8 = {-1, 0, 1, -1, 1, -1, 0, 1};

  static class TaskX {

    public void solve(int testNumber, MyInput in, PrintWriter out) {

      int n = in.nextInt(), m = in.nextInt();
      long[] f = new long[100010];
      boolean[] d = new boolean[100010];
      for (int i = 0; i < m; i++) {
        int a = in.nextInt();
        d[a] = true;
      }

      f[0] = 1;

      for (int i = 0; i < 100005; i++) {
        if (!d[i+1]) {
          f[i+1] += f[i];
          f[i+1] %= MOD;
        }

        if (!d[i+2]) {
          f[i+2] += f[i];
          f[i+2] %= MOD;
        }
      }

      out.println(f[n]);
    }
  }

  static class MyInput {
    private final BufferedReader in;
    private static int pos;
    private static int readLen;
    private static final char[] buffer = new char[1024 * 8];
    private static char[] str = new char[500 * 8 * 2];
    private static boolean[] isDigit = new boolean[256];
    private static boolean[] isSpace = new boolean[256];
    private static boolean[] isLineSep = new boolean[256];

    static {
      for (int i = 0; i < 10; i++) {
        isDigit['0' + i] = true;
      }
      isDigit['-'] = true;
      isSpace[' '] = isSpace['\r'] = isSpace['\n'] = isSpace['\t'] = true;
      isLineSep['\r'] = isLineSep['\n'] = true;
    }

    public MyInput(InputStream is) {
      in = new BufferedReader(new InputStreamReader(is));
    }

    public int read() {
      if (pos >= readLen) {
        pos = 0;
        try {
          readLen = in.read(buffer);
        } catch (IOException e) {
          throw new RuntimeException();
        }
        if (readLen <= 0) {
          throw new MyInput.EndOfFileRuntimeException();
        }
      }
      return buffer[pos++];
    }

    public int nextInt() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      int i = 0;
      int ret = 0;
      if (str[0] == '-') {
        i = 1;
      }
      for (; i < len; i++)
        ret = ret * 10 + str[i] - '0';
      if (str[0] == '-') {
        ret = -ret;
      }
      return ret;
    }

    public long nextLong() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      int i = 0;
      long ret = 0;
      if (str[0] == '-') {
        i = 1;
      }
      for (; i < len; i++)
        ret = ret * 10 + str[i] - '0';
      if (str[0] == '-') {
        ret = -ret;
      }
      return ret;
    }

    public char nextChar() {
      while (true) {
        final int c = read();
        if (!isSpace[c]) {
          return (char) c;
        }
      }
    }

    public String nextString() {
      return new String(nextChars());
    }

    public char[] nextChars() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      return Arrays.copyOf(str, len);
    }

    public char[][] next2DChars(int h, int w) {
      char[][] s = new char[h][w];
      for (int i = 0; i < h; i++) {
        s[i] = nextChars();
      }
      return s;
    }

    int reads(int len, boolean[] accept) {
      try {
        while (true) {
          final int c = read();
          if (accept[c]) {
            break;
          }
          if (str.length == len) {
            char[] rep = new char[str.length * 3 / 2];
            System.arraycopy(str, 0, rep, 0, str.length);
            str = rep;
          }
          str[len++] = (char) c;
        }
      } catch (MyInput.EndOfFileRuntimeException e) {
      }
      return len;
    }

    public int[] nextIntArray(final int n) {
      final int[] res = new int[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextInt();
      }
      return res;
    }

    public int[] nextIntArray1Index(final int n) {
      final int[] res = new int[n + 1];
      for (int i = 1; i < n + 1; i++) {
        res[i] = nextInt();
      }
      return res;
    }

    public int[] nextIntArrayDec(final int n) {
      final int[] res = new int[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextInt() - 1;
      }
      return res;
    }

    public long[] nextLongArray(final int n) {
      final long[] res = new long[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextLong();
      }
      return res;
    }

    public long[] nextLongArray1Index(final int n) {
      final long[] res = new long[n + 1];
      for (int i = 1; i < n + 1; i++) {
        res[i] = nextLong();
      }
      return res;
    }

    public long[] nextLongArrayDec(final int n) {
      final long[] res = new long[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextLong() - 1;
      }
      return res;
    }

    public double nextDouble() {
      return Double.parseDouble(nextString());
    }

    public double[] nextDoubleArray(int n) {
      double[] res = new double[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextDouble();
      }
      return res;
    }

    static class EndOfFileRuntimeException extends RuntimeException {
    }

  }

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.OutputStream; OutputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Arrays; Arrays java.util public class Main {

  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    MyInput in = new MyInput(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    TaskX solver = new TaskX();
    solver.solve(1, in, out);
    out.close();
  }

  static int INF = 1 << 30;
  static long LINF = 1L << 55;
  static int MOD = 1000000007;
  static int[] mh4 = {0, -1, 1, 0};
  static int[] mw4 = {-1, 0, 0, 1};
  static int[] mh8 = {-1, -1, -1, 0, 0, 1, 1, 1};
  static int[] mw8 = {-1, 0, 1, -1, 1, -1, 0, 1};

  static class TaskX {

    public void solve(int testNumber, MyInput in, PrintWriter out) {

      int n = in.nextInt(), m = in.nextInt();
      long[] f = new long[100010];
      boolean[] d = new boolean[100010];
      for (int i = 0; i < m; i++) {
        int a = in.nextInt();
        d[a] = true;
      }

      f[0] = 1;

      for (int i = 0; i < 100005; i++) {
        if (!d[i+1]) {
          f[i+1] += f[i];
          f[i+1] %= MOD;
        }

        if (!d[i+2]) {
          f[i+2] += f[i];
          f[i+2] %= MOD;
        }
      }

      out.println(f[n]);
    }
  }

  static class MyInput {
    private final BufferedReader in;
    private static int pos;
    private static int readLen;
    private static final char[] buffer = new char[1024 * 8];
    private static char[] str = new char[500 * 8 * 2];
    private static boolean[] isDigit = new boolean[256];
    private static boolean[] isSpace = new boolean[256];
    private static boolean[] isLineSep = new boolean[256];

    static {
      for (int i = 0; i < 10; i++) {
        isDigit['0' + i] = true;
      }
      isDigit['-'] = true;
      isSpace[' '] = isSpace['\r'] = isSpace['\n'] = isSpace['\t'] = true;
      isLineSep['\r'] = isLineSep['\n'] = true;
    }

    public MyInput(InputStream is) {
      in = new BufferedReader(new InputStreamReader(is));
    }

    public int read() {
      if (pos >= readLen) {
        pos = 0;
        try {
          readLen = in.read(buffer);
        } catch (IOException e) {
          throw new RuntimeException();
        }
        if (readLen <= 0) {
          throw new MyInput.EndOfFileRuntimeException();
        }
      }
      return buffer[pos++];
    }

    public int nextInt() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      int i = 0;
      int ret = 0;
      if (str[0] == '-') {
        i = 1;
      }
      for (; i < len; i++)
        ret = ret * 10 + str[i] - '0';
      if (str[0] == '-') {
        ret = -ret;
      }
      return ret;
    }

    public long nextLong() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      int i = 0;
      long ret = 0;
      if (str[0] == '-') {
        i = 1;
      }
      for (; i < len; i++)
        ret = ret * 10 + str[i] - '0';
      if (str[0] == '-') {
        ret = -ret;
      }
      return ret;
    }

    public char nextChar() {
      while (true) {
        final int c = read();
        if (!isSpace[c]) {
          return (char) c;
        }
      }
    }

    public String nextString() {
      return new String(nextChars());
    }

    public char[] nextChars() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      return Arrays.copyOf(str, len);
    }

    public char[][] next2DChars(int h, int w) {
      char[][] s = new char[h][w];
      for (int i = 0; i < h; i++) {
        s[i] = nextChars();
      }
      return s;
    }

    int reads(int len, boolean[] accept) {
      try {
        while (true) {
          final int c = read();
          if (accept[c]) {
            break;
          }
          if (str.length == len) {
            char[] rep = new char[str.length * 3 / 2];
            System.arraycopy(str, 0, rep, 0, str.length);
            str = rep;
          }
          str[len++] = (char) c;
        }
      } catch (MyInput.EndOfFileRuntimeException e) {
      }
      return len;
    }

    public int[] nextIntArray(final int n) {
      final int[] res = new int[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextInt();
      }
      return res;
    }

    public int[] nextIntArray1Index(final int n) {
      final int[] res = new int[n + 1];
      for (int i = 1; i < n + 1; i++) {
        res[i] = nextInt();
      }
      return res;
    }

    public int[] nextIntArrayDec(final int n) {
      final int[] res = new int[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextInt() - 1;
      }
      return res;
    }

    public long[] nextLongArray(final int n) {
      final long[] res = new long[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextLong();
      }
      return res;
    }

    public long[] nextLongArray1Index(final int n) {
      final long[] res = new long[n + 1];
      for (int i = 1; i < n + 1; i++) {
        res[i] = nextLong();
      }
      return res;
    }

    public long[] nextLongArrayDec(final int n) {
      final long[] res = new long[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextLong() - 1;
      }
      return res;
    }

    public double nextDouble() {
      return Double.parseDouble(nextString());
    }

    public double[] nextDoubleArray(int n) {
      double[] res = new double[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextDouble();
      }
      return res;
    }

    static class EndOfFileRuntimeException extends RuntimeException {
    }

  }

} Main static int INF = 1 << 30; INF 1 << 30 1 30 static long LINF = 1L << 55; LINF 1L << 55 1L 55 static int MOD = 1000000007; MOD 1000000007 static int[] mh4 = {0, -1, 1, 0}; mh4 {0, -1, 1, 0} 0 -1 1 1 0 static int[] mw4 = {-1, 0, 0, 1}; mw4 {-1, 0, 0, 1} -1 1 0 0 1 static int[] mh8 = {-1, -1, -1, 0, 0, 1, 1, 1}; mh8 {-1, -1, -1, 0, 0, 1, 1, 1} -1 1 -1 1 -1 1 0 0 1 1 1 static int[] mw8 = {-1, 0, 1, -1, 1, -1, 0, 1}; mw8 {-1, 0, 1, -1, 1, -1, 0, 1} -1 1 0 1 -1 1 1 -1 1 0 1 public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    MyInput in = new MyInput(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    TaskX solver = new TaskX();
    solver.solve(1, in, out);
    out.close();
  } main {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    MyInput in = new MyInput(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    TaskX solver = new TaskX();
    solver.solve(1, in, out);
    out.close();
  } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out MyInput in = new MyInput(inputStream); in new MyInput(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) TaskX solver = new TaskX(); solver new TaskX() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class TaskX {

    public void solve(int testNumber, MyInput in, PrintWriter out) {

      int n = in.nextInt(), m = in.nextInt();
      long[] f = new long[100010];
      boolean[] d = new boolean[100010];
      for (int i = 0; i < m; i++) {
        int a = in.nextInt();
        d[a] = true;
      }

      f[0] = 1;

      for (int i = 0; i < 100005; i++) {
        if (!d[i+1]) {
          f[i+1] += f[i];
          f[i+1] %= MOD;
        }

        if (!d[i+2]) {
          f[i+2] += f[i];
          f[i+2] %= MOD;
        }
      }

      out.println(f[n]);
    }
  } TaskX public void solve(int testNumber, MyInput in, PrintWriter out) {

      int n = in.nextInt(), m = in.nextInt();
      long[] f = new long[100010];
      boolean[] d = new boolean[100010];
      for (int i = 0; i < m; i++) {
        int a = in.nextInt();
        d[a] = true;
      }

      f[0] = 1;

      for (int i = 0; i < 100005; i++) {
        if (!d[i+1]) {
          f[i+1] += f[i];
          f[i+1] %= MOD;
        }

        if (!d[i+2]) {
          f[i+2] += f[i];
          f[i+2] %= MOD;
        }
      }

      out.println(f[n]);
    } solve {

      int n = in.nextInt(), m = in.nextInt();
      long[] f = new long[100010];
      boolean[] d = new boolean[100010];
      for (int i = 0; i < m; i++) {
        int a = in.nextInt();
        d[a] = true;
      }

      f[0] = 1;

      for (int i = 0; i < 100005; i++) {
        if (!d[i+1]) {
          f[i+1] += f[i];
          f[i+1] %= MOD;
        }

        if (!d[i+2]) {
          f[i+2] += f[i];
          f[i+2] %= MOD;
        }
      }

      out.println(f[n]);
    } int n = in.nextInt() n in.nextInt() in.nextInt in m = in.nextInt(); m in.nextInt() in.nextInt in long[] f = new long[100010]; f new long[100010] 100010 boolean[] d = new boolean[100010]; d new boolean[100010] 100010 for (int i = 0; i < m; i++) {
        int a = in.nextInt();
        d[a] = true;
      } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
        int a = in.nextInt();
        d[a] = true;
      } {
        int a = in.nextInt();
        d[a] = true;
      } int a = in.nextInt(); a in.nextInt() in.nextInt in d[a] = true d[a] d a true f[0] = 1 f[0] f 0 1 for (int i = 0; i < 100005; i++) {
        if (!d[i+1]) {
          f[i+1] += f[i];
          f[i+1] %= MOD;
        }

        if (!d[i+2]) {
          f[i+2] += f[i];
          f[i+2] %= MOD;
        }
      } int i = 0; int i = 0; i 0 i < 100005 i 100005 i++ i++ i {
        if (!d[i+1]) {
          f[i+1] += f[i];
          f[i+1] %= MOD;
        }

        if (!d[i+2]) {
          f[i+2] += f[i];
          f[i+2] %= MOD;
        }
      } {
        if (!d[i+1]) {
          f[i+1] += f[i];
          f[i+1] %= MOD;
        }

        if (!d[i+2]) {
          f[i+2] += f[i];
          f[i+2] %= MOD;
        }
      } if (!d[i+1]) {
          f[i+1] += f[i];
          f[i+1] %= MOD;
        } !d[i+1] d[i+1] d i+1 i 1 {
          f[i+1] += f[i];
          f[i+1] %= MOD;
        } f[i+1] += f[i] f[i+1] f i+1 i 1 f[i] f i f[i+1] %= MOD f[i+1] f i+1 i 1 MOD if (!d[i+2]) {
          f[i+2] += f[i];
          f[i+2] %= MOD;
        } !d[i+2] d[i+2] d i+2 i 2 {
          f[i+2] += f[i];
          f[i+2] %= MOD;
        } f[i+2] += f[i] f[i+2] f i+2 i 2 f[i] f i f[i+2] %= MOD f[i+2] f i+2 i 2 MOD out.println(f[n]) out.println out f[n] f n int testNumber testNumber MyInput in in PrintWriter out out static class MyInput {
    private final BufferedReader in;
    private static int pos;
    private static int readLen;
    private static final char[] buffer = new char[1024 * 8];
    private static char[] str = new char[500 * 8 * 2];
    private static boolean[] isDigit = new boolean[256];
    private static boolean[] isSpace = new boolean[256];
    private static boolean[] isLineSep = new boolean[256];

    static {
      for (int i = 0; i < 10; i++) {
        isDigit['0' + i] = true;
      }
      isDigit['-'] = true;
      isSpace[' '] = isSpace['\r'] = isSpace['\n'] = isSpace['\t'] = true;
      isLineSep['\r'] = isLineSep['\n'] = true;
    }

    public MyInput(InputStream is) {
      in = new BufferedReader(new InputStreamReader(is));
    }

    public int read() {
      if (pos >= readLen) {
        pos = 0;
        try {
          readLen = in.read(buffer);
        } catch (IOException e) {
          throw new RuntimeException();
        }
        if (readLen <= 0) {
          throw new MyInput.EndOfFileRuntimeException();
        }
      }
      return buffer[pos++];
    }

    public int nextInt() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      int i = 0;
      int ret = 0;
      if (str[0] == '-') {
        i = 1;
      }
      for (; i < len; i++)
        ret = ret * 10 + str[i] - '0';
      if (str[0] == '-') {
        ret = -ret;
      }
      return ret;
    }

    public long nextLong() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      int i = 0;
      long ret = 0;
      if (str[0] == '-') {
        i = 1;
      }
      for (; i < len; i++)
        ret = ret * 10 + str[i] - '0';
      if (str[0] == '-') {
        ret = -ret;
      }
      return ret;
    }

    public char nextChar() {
      while (true) {
        final int c = read();
        if (!isSpace[c]) {
          return (char) c;
        }
      }
    }

    public String nextString() {
      return new String(nextChars());
    }

    public char[] nextChars() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      return Arrays.copyOf(str, len);
    }

    public char[][] next2DChars(int h, int w) {
      char[][] s = new char[h][w];
      for (int i = 0; i < h; i++) {
        s[i] = nextChars();
      }
      return s;
    }

    int reads(int len, boolean[] accept) {
      try {
        while (true) {
          final int c = read();
          if (accept[c]) {
            break;
          }
          if (str.length == len) {
            char[] rep = new char[str.length * 3 / 2];
            System.arraycopy(str, 0, rep, 0, str.length);
            str = rep;
          }
          str[len++] = (char) c;
        }
      } catch (MyInput.EndOfFileRuntimeException e) {
      }
      return len;
    }

    public int[] nextIntArray(final int n) {
      final int[] res = new int[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextInt();
      }
      return res;
    }

    public int[] nextIntArray1Index(final int n) {
      final int[] res = new int[n + 1];
      for (int i = 1; i < n + 1; i++) {
        res[i] = nextInt();
      }
      return res;
    }

    public int[] nextIntArrayDec(final int n) {
      final int[] res = new int[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextInt() - 1;
      }
      return res;
    }

    public long[] nextLongArray(final int n) {
      final long[] res = new long[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextLong();
      }
      return res;
    }

    public long[] nextLongArray1Index(final int n) {
      final long[] res = new long[n + 1];
      for (int i = 1; i < n + 1; i++) {
        res[i] = nextLong();
      }
      return res;
    }

    public long[] nextLongArrayDec(final int n) {
      final long[] res = new long[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextLong() - 1;
      }
      return res;
    }

    public double nextDouble() {
      return Double.parseDouble(nextString());
    }

    public double[] nextDoubleArray(int n) {
      double[] res = new double[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextDouble();
      }
      return res;
    }

    static class EndOfFileRuntimeException extends RuntimeException {
    }

  } MyInput private final BufferedReader in; in private static int pos; pos private static int readLen; readLen private static final char[] buffer = new char[1024 * 8]; buffer new char[1024 * 8] 1024 * 8 1024 8 private static char[] str = new char[500 * 8 * 2]; str new char[500 * 8 * 2] 500 * 8 * 2 500 * 8 * 2 500 8 2 private static boolean[] isDigit = new boolean[256]; isDigit new boolean[256] 256 private static boolean[] isSpace = new boolean[256]; isSpace new boolean[256] 256 private static boolean[] isLineSep = new boolean[256]; isLineSep new boolean[256] 256 public MyInput(InputStream is) {
      in = new BufferedReader(new InputStreamReader(is));
    } MyInput {
      in = new BufferedReader(new InputStreamReader(is));
    } in = new BufferedReader(new InputStreamReader(is)) in new BufferedReader(new InputStreamReader(is)) InputStream is is public int read() {
      if (pos >= readLen) {
        pos = 0;
        try {
          readLen = in.read(buffer);
        } catch (IOException e) {
          throw new RuntimeException();
        }
        if (readLen <= 0) {
          throw new MyInput.EndOfFileRuntimeException();
        }
      }
      return buffer[pos++];
    } read {
      if (pos >= readLen) {
        pos = 0;
        try {
          readLen = in.read(buffer);
        } catch (IOException e) {
          throw new RuntimeException();
        }
        if (readLen <= 0) {
          throw new MyInput.EndOfFileRuntimeException();
        }
      }
      return buffer[pos++];
    } if (pos >= readLen) {
        pos = 0;
        try {
          readLen = in.read(buffer);
        } catch (IOException e) {
          throw new RuntimeException();
        }
        if (readLen <= 0) {
          throw new MyInput.EndOfFileRuntimeException();
        }
      } pos >= readLen pos readLen {
        pos = 0;
        try {
          readLen = in.read(buffer);
        } catch (IOException e) {
          throw new RuntimeException();
        }
        if (readLen <= 0) {
          throw new MyInput.EndOfFileRuntimeException();
        }
      } pos = 0 pos 0 try {
          readLen = in.read(buffer);
        } catch (IOException e) {
          throw new RuntimeException();
        } catch (IOException e) {
          throw new RuntimeException();
        } IOException e {
          throw new RuntimeException();
        } throw new RuntimeException(); new RuntimeException() {
          readLen = in.read(buffer);
        } readLen = in.read(buffer) readLen in.read(buffer) in.read in buffer if (readLen <= 0) {
          throw new MyInput.EndOfFileRuntimeException();
        } readLen <= 0 readLen 0 {
          throw new MyInput.EndOfFileRuntimeException();
        } throw new MyInput.EndOfFileRuntimeException(); new MyInput.EndOfFileRuntimeException() return buffer[pos++]; buffer[pos++] buffer pos++ pos public int nextInt() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      int i = 0;
      int ret = 0;
      if (str[0] == '-') {
        i = 1;
      }
      for (; i < len; i++)
        ret = ret * 10 + str[i] - '0';
      if (str[0] == '-') {
        ret = -ret;
      }
      return ret;
    } nextInt {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      int i = 0;
      int ret = 0;
      if (str[0] == '-') {
        i = 1;
      }
      for (; i < len; i++)
        ret = ret * 10 + str[i] - '0';
      if (str[0] == '-') {
        ret = -ret;
      }
      return ret;
    } int len = 0; len 0 str[len++] = nextChar() str[len++] str len++ len nextChar() nextChar len = reads(len, isSpace) len reads(len, isSpace) reads len isSpace int i = 0; i 0 int ret = 0; ret 0 if (str[0] == '-') {
        i = 1;
      } str[0] == '-' str[0] str 0 '-' {
        i = 1;
      } i = 1 i 1 for (; i < len; i++)
        ret = ret * 10 + str[i] - '0'; ; i < len i len i++ i++ i ret = ret * 10 + str[i] - '0'; ret = ret * 10 + str[i] - '0' ret ret * 10 + str[i] - '0' ret * 10 + str[i] ret * 10 ret 10 str[i] str i '0' if (str[0] == '-') {
        ret = -ret;
      } str[0] == '-' str[0] str 0 '-' {
        ret = -ret;
      } ret = -ret ret -ret ret return ret; ret public long nextLong() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      int i = 0;
      long ret = 0;
      if (str[0] == '-') {
        i = 1;
      }
      for (; i < len; i++)
        ret = ret * 10 + str[i] - '0';
      if (str[0] == '-') {
        ret = -ret;
      }
      return ret;
    } nextLong {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      int i = 0;
      long ret = 0;
      if (str[0] == '-') {
        i = 1;
      }
      for (; i < len; i++)
        ret = ret * 10 + str[i] - '0';
      if (str[0] == '-') {
        ret = -ret;
      }
      return ret;
    } int len = 0; len 0 str[len++] = nextChar() str[len++] str len++ len nextChar() nextChar len = reads(len, isSpace) len reads(len, isSpace) reads len isSpace int i = 0; i 0 long ret = 0; ret 0 if (str[0] == '-') {
        i = 1;
      } str[0] == '-' str[0] str 0 '-' {
        i = 1;
      } i = 1 i 1 for (; i < len; i++)
        ret = ret * 10 + str[i] - '0'; ; i < len i len i++ i++ i ret = ret * 10 + str[i] - '0'; ret = ret * 10 + str[i] - '0' ret ret * 10 + str[i] - '0' ret * 10 + str[i] ret * 10 ret 10 str[i] str i '0' if (str[0] == '-') {
        ret = -ret;
      } str[0] == '-' str[0] str 0 '-' {
        ret = -ret;
      } ret = -ret ret -ret ret return ret; ret public char nextChar() {
      while (true) {
        final int c = read();
        if (!isSpace[c]) {
          return (char) c;
        }
      }
    } nextChar {
      while (true) {
        final int c = read();
        if (!isSpace[c]) {
          return (char) c;
        }
      }
    } while (true) {
        final int c = read();
        if (!isSpace[c]) {
          return (char) c;
        }
      } true {
        final int c = read();
        if (!isSpace[c]) {
          return (char) c;
        }
      } final int c = read(); c read() read if (!isSpace[c]) {
          return (char) c;
        } !isSpace[c] isSpace[c] isSpace c {
          return (char) c;
        } return (char) c; (char) c public String nextString() {
      return new String(nextChars());
    } nextString {
      return new String(nextChars());
    } return new String(nextChars()); new String(nextChars()) public char[] nextChars() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      return Arrays.copyOf(str, len);
    } nextChars {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      return Arrays.copyOf(str, len);
    } int len = 0; len 0 str[len++] = nextChar() str[len++] str len++ len nextChar() nextChar len = reads(len, isSpace) len reads(len, isSpace) reads len isSpace return Arrays.copyOf(str, len); Arrays.copyOf(str, len) Arrays.copyOf Arrays str len public char[][] next2DChars(int h, int w) {
      char[][] s = new char[h][w];
      for (int i = 0; i < h; i++) {
        s[i] = nextChars();
      }
      return s;
    } next2DChars {
      char[][] s = new char[h][w];
      for (int i = 0; i < h; i++) {
        s[i] = nextChars();
      }
      return s;
    } char[][] s = new char[h][w]; s new char[h][w] h w for (int i = 0; i < h; i++) {
        s[i] = nextChars();
      } int i = 0; int i = 0; i 0 i < h i h i++ i++ i {
        s[i] = nextChars();
      } {
        s[i] = nextChars();
      } s[i] = nextChars() s[i] s i nextChars() nextChars return s; s int h h int w w int reads(int len, boolean[] accept) {
      try {
        while (true) {
          final int c = read();
          if (accept[c]) {
            break;
          }
          if (str.length == len) {
            char[] rep = new char[str.length * 3 / 2];
            System.arraycopy(str, 0, rep, 0, str.length);
            str = rep;
          }
          str[len++] = (char) c;
        }
      } catch (MyInput.EndOfFileRuntimeException e) {
      }
      return len;
    } reads {
      try {
        while (true) {
          final int c = read();
          if (accept[c]) {
            break;
          }
          if (str.length == len) {
            char[] rep = new char[str.length * 3 / 2];
            System.arraycopy(str, 0, rep, 0, str.length);
            str = rep;
          }
          str[len++] = (char) c;
        }
      } catch (MyInput.EndOfFileRuntimeException e) {
      }
      return len;
    } try {
        while (true) {
          final int c = read();
          if (accept[c]) {
            break;
          }
          if (str.length == len) {
            char[] rep = new char[str.length * 3 / 2];
            System.arraycopy(str, 0, rep, 0, str.length);
            str = rep;
          }
          str[len++] = (char) c;
        }
      } catch (MyInput.EndOfFileRuntimeException e) {
      } catch (MyInput.EndOfFileRuntimeException e) {
      } MyInput.EndOfFileRuntimeException e {
      } {
        while (true) {
          final int c = read();
          if (accept[c]) {
            break;
          }
          if (str.length == len) {
            char[] rep = new char[str.length * 3 / 2];
            System.arraycopy(str, 0, rep, 0, str.length);
            str = rep;
          }
          str[len++] = (char) c;
        }
      } while (true) {
          final int c = read();
          if (accept[c]) {
            break;
          }
          if (str.length == len) {
            char[] rep = new char[str.length * 3 / 2];
            System.arraycopy(str, 0, rep, 0, str.length);
            str = rep;
          }
          str[len++] = (char) c;
        } true {
          final int c = read();
          if (accept[c]) {
            break;
          }
          if (str.length == len) {
            char[] rep = new char[str.length * 3 / 2];
            System.arraycopy(str, 0, rep, 0, str.length);
            str = rep;
          }
          str[len++] = (char) c;
        } final int c = read(); c read() read if (accept[c]) {
            break;
          } accept[c] accept c {
            break;
          } break; if (str.length == len) {
            char[] rep = new char[str.length * 3 / 2];
            System.arraycopy(str, 0, rep, 0, str.length);
            str = rep;
          } str.length == len str.length str str.length len {
            char[] rep = new char[str.length * 3 / 2];
            System.arraycopy(str, 0, rep, 0, str.length);
            str = rep;
          } char[] rep = new char[str.length * 3 / 2]; rep new char[str.length * 3 / 2] str.length * 3 / 2 str.length * 3 str.length str str.length 3 2 System.arraycopy(str, 0, rep, 0, str.length) System.arraycopy System str 0 rep 0 str.length str str.length str = rep str rep str[len++] = (char) c str[len++] str len++ len (char) c return len; len int len len boolean[] accept accept public int[] nextIntArray(final int n) {
      final int[] res = new int[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextInt();
      }
      return res;
    } nextIntArray {
      final int[] res = new int[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextInt();
      }
      return res;
    } final int[] res = new int[n]; res new int[n] n for (int i = 0; i < n; i++) {
        res[i] = nextInt();
      } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        res[i] = nextInt();
      } {
        res[i] = nextInt();
      } res[i] = nextInt() res[i] res i nextInt() nextInt return res; res final int n n public int[] nextIntArray1Index(final int n) {
      final int[] res = new int[n + 1];
      for (int i = 1; i < n + 1; i++) {
        res[i] = nextInt();
      }
      return res;
    } nextIntArray1Index {
      final int[] res = new int[n + 1];
      for (int i = 1; i < n + 1; i++) {
        res[i] = nextInt();
      }
      return res;
    } final int[] res = new int[n + 1]; res new int[n + 1] n + 1 n 1 for (int i = 1; i < n + 1; i++) {
        res[i] = nextInt();
      } int i = 1; int i = 1; i 1 i < n + 1 i n + 1 n 1 i++ i++ i {
        res[i] = nextInt();
      } {
        res[i] = nextInt();
      } res[i] = nextInt() res[i] res i nextInt() nextInt return res; res final int n n public int[] nextIntArrayDec(final int n) {
      final int[] res = new int[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextInt() - 1;
      }
      return res;
    } nextIntArrayDec {
      final int[] res = new int[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextInt() - 1;
      }
      return res;
    } final int[] res = new int[n]; res new int[n] n for (int i = 0; i < n; i++) {
        res[i] = nextInt() - 1;
      } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        res[i] = nextInt() - 1;
      } {
        res[i] = nextInt() - 1;
      } res[i] = nextInt() - 1 res[i] res i nextInt() - 1 nextInt() nextInt 1 return res; res final int n n public long[] nextLongArray(final int n) {
      final long[] res = new long[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextLong();
      }
      return res;
    } nextLongArray {
      final long[] res = new long[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextLong();
      }
      return res;
    } final long[] res = new long[n]; res new long[n] n for (int i = 0; i < n; i++) {
        res[i] = nextLong();
      } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        res[i] = nextLong();
      } {
        res[i] = nextLong();
      } res[i] = nextLong() res[i] res i nextLong() nextLong return res; res final int n n public long[] nextLongArray1Index(final int n) {
      final long[] res = new long[n + 1];
      for (int i = 1; i < n + 1; i++) {
        res[i] = nextLong();
      }
      return res;
    } nextLongArray1Index {
      final long[] res = new long[n + 1];
      for (int i = 1; i < n + 1; i++) {
        res[i] = nextLong();
      }
      return res;
    } final long[] res = new long[n + 1]; res new long[n + 1] n + 1 n 1 for (int i = 1; i < n + 1; i++) {
        res[i] = nextLong();
      } int i = 1; int i = 1; i 1 i < n + 1 i n + 1 n 1 i++ i++ i {
        res[i] = nextLong();
      } {
        res[i] = nextLong();
      } res[i] = nextLong() res[i] res i nextLong() nextLong return res; res final int n n public long[] nextLongArrayDec(final int n) {
      final long[] res = new long[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextLong() - 1;
      }
      return res;
    } nextLongArrayDec {
      final long[] res = new long[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextLong() - 1;
      }
      return res;
    } final long[] res = new long[n]; res new long[n] n for (int i = 0; i < n; i++) {
        res[i] = nextLong() - 1;
      } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        res[i] = nextLong() - 1;
      } {
        res[i] = nextLong() - 1;
      } res[i] = nextLong() - 1 res[i] res i nextLong() - 1 nextLong() nextLong 1 return res; res final int n n public double nextDouble() {
      return Double.parseDouble(nextString());
    } nextDouble {
      return Double.parseDouble(nextString());
    } return Double.parseDouble(nextString()); Double.parseDouble(nextString()) Double.parseDouble Double nextString() nextString public double[] nextDoubleArray(int n) {
      double[] res = new double[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextDouble();
      }
      return res;
    } nextDoubleArray {
      double[] res = new double[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextDouble();
      }
      return res;
    } double[] res = new double[n]; res new double[n] n for (int i = 0; i < n; i++) {
        res[i] = nextDouble();
      } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        res[i] = nextDouble();
      } {
        res[i] = nextDouble();
      } res[i] = nextDouble() res[i] res i nextDouble() nextDouble return res; res int n n static class EndOfFileRuntimeException extends RuntimeException {
    } EndOfFileRuntimeException RuntimeException public class Main {

  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    MyInput in = new MyInput(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    TaskX solver = new TaskX();
    solver.solve(1, in, out);
    out.close();
  }

  static int INF = 1 << 30;
  static long LINF = 1L << 55;
  static int MOD = 1000000007;
  static int[] mh4 = {0, -1, 1, 0};
  static int[] mw4 = {-1, 0, 0, 1};
  static int[] mh8 = {-1, -1, -1, 0, 0, 1, 1, 1};
  static int[] mw8 = {-1, 0, 1, -1, 1, -1, 0, 1};

  static class TaskX {

    public void solve(int testNumber, MyInput in, PrintWriter out) {

      int n = in.nextInt(), m = in.nextInt();
      long[] f = new long[100010];
      boolean[] d = new boolean[100010];
      for (int i = 0; i < m; i++) {
        int a = in.nextInt();
        d[a] = true;
      }

      f[0] = 1;

      for (int i = 0; i < 100005; i++) {
        if (!d[i+1]) {
          f[i+1] += f[i];
          f[i+1] %= MOD;
        }

        if (!d[i+2]) {
          f[i+2] += f[i];
          f[i+2] %= MOD;
        }
      }

      out.println(f[n]);
    }
  }

  static class MyInput {
    private final BufferedReader in;
    private static int pos;
    private static int readLen;
    private static final char[] buffer = new char[1024 * 8];
    private static char[] str = new char[500 * 8 * 2];
    private static boolean[] isDigit = new boolean[256];
    private static boolean[] isSpace = new boolean[256];
    private static boolean[] isLineSep = new boolean[256];

    static {
      for (int i = 0; i < 10; i++) {
        isDigit['0' + i] = true;
      }
      isDigit['-'] = true;
      isSpace[' '] = isSpace['\r'] = isSpace['\n'] = isSpace['\t'] = true;
      isLineSep['\r'] = isLineSep['\n'] = true;
    }

    public MyInput(InputStream is) {
      in = new BufferedReader(new InputStreamReader(is));
    }

    public int read() {
      if (pos >= readLen) {
        pos = 0;
        try {
          readLen = in.read(buffer);
        } catch (IOException e) {
          throw new RuntimeException();
        }
        if (readLen <= 0) {
          throw new MyInput.EndOfFileRuntimeException();
        }
      }
      return buffer[pos++];
    }

    public int nextInt() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      int i = 0;
      int ret = 0;
      if (str[0] == '-') {
        i = 1;
      }
      for (; i < len; i++)
        ret = ret * 10 + str[i] - '0';
      if (str[0] == '-') {
        ret = -ret;
      }
      return ret;
    }

    public long nextLong() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      int i = 0;
      long ret = 0;
      if (str[0] == '-') {
        i = 1;
      }
      for (; i < len; i++)
        ret = ret * 10 + str[i] - '0';
      if (str[0] == '-') {
        ret = -ret;
      }
      return ret;
    }

    public char nextChar() {
      while (true) {
        final int c = read();
        if (!isSpace[c]) {
          return (char) c;
        }
      }
    }

    public String nextString() {
      return new String(nextChars());
    }

    public char[] nextChars() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      return Arrays.copyOf(str, len);
    }

    public char[][] next2DChars(int h, int w) {
      char[][] s = new char[h][w];
      for (int i = 0; i < h; i++) {
        s[i] = nextChars();
      }
      return s;
    }

    int reads(int len, boolean[] accept) {
      try {
        while (true) {
          final int c = read();
          if (accept[c]) {
            break;
          }
          if (str.length == len) {
            char[] rep = new char[str.length * 3 / 2];
            System.arraycopy(str, 0, rep, 0, str.length);
            str = rep;
          }
          str[len++] = (char) c;
        }
      } catch (MyInput.EndOfFileRuntimeException e) {
      }
      return len;
    }

    public int[] nextIntArray(final int n) {
      final int[] res = new int[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextInt();
      }
      return res;
    }

    public int[] nextIntArray1Index(final int n) {
      final int[] res = new int[n + 1];
      for (int i = 1; i < n + 1; i++) {
        res[i] = nextInt();
      }
      return res;
    }

    public int[] nextIntArrayDec(final int n) {
      final int[] res = new int[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextInt() - 1;
      }
      return res;
    }

    public long[] nextLongArray(final int n) {
      final long[] res = new long[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextLong();
      }
      return res;
    }

    public long[] nextLongArray1Index(final int n) {
      final long[] res = new long[n + 1];
      for (int i = 1; i < n + 1; i++) {
        res[i] = nextLong();
      }
      return res;
    }

    public long[] nextLongArrayDec(final int n) {
      final long[] res = new long[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextLong() - 1;
      }
      return res;
    }

    public double nextDouble() {
      return Double.parseDouble(nextString());
    }

    public double[] nextDoubleArray(int n) {
      double[] res = new double[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextDouble();
      }
      return res;
    }

    static class EndOfFileRuntimeException extends RuntimeException {
    }

  }

} public class Main {

  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    MyInput in = new MyInput(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    TaskX solver = new TaskX();
    solver.solve(1, in, out);
    out.close();
  }

  static int INF = 1 << 30;
  static long LINF = 1L << 55;
  static int MOD = 1000000007;
  static int[] mh4 = {0, -1, 1, 0};
  static int[] mw4 = {-1, 0, 0, 1};
  static int[] mh8 = {-1, -1, -1, 0, 0, 1, 1, 1};
  static int[] mw8 = {-1, 0, 1, -1, 1, -1, 0, 1};

  static class TaskX {

    public void solve(int testNumber, MyInput in, PrintWriter out) {

      int n = in.nextInt(), m = in.nextInt();
      long[] f = new long[100010];
      boolean[] d = new boolean[100010];
      for (int i = 0; i < m; i++) {
        int a = in.nextInt();
        d[a] = true;
      }

      f[0] = 1;

      for (int i = 0; i < 100005; i++) {
        if (!d[i+1]) {
          f[i+1] += f[i];
          f[i+1] %= MOD;
        }

        if (!d[i+2]) {
          f[i+2] += f[i];
          f[i+2] %= MOD;
        }
      }

      out.println(f[n]);
    }
  }

  static class MyInput {
    private final BufferedReader in;
    private static int pos;
    private static int readLen;
    private static final char[] buffer = new char[1024 * 8];
    private static char[] str = new char[500 * 8 * 2];
    private static boolean[] isDigit = new boolean[256];
    private static boolean[] isSpace = new boolean[256];
    private static boolean[] isLineSep = new boolean[256];

    static {
      for (int i = 0; i < 10; i++) {
        isDigit['0' + i] = true;
      }
      isDigit['-'] = true;
      isSpace[' '] = isSpace['\r'] = isSpace['\n'] = isSpace['\t'] = true;
      isLineSep['\r'] = isLineSep['\n'] = true;
    }

    public MyInput(InputStream is) {
      in = new BufferedReader(new InputStreamReader(is));
    }

    public int read() {
      if (pos >= readLen) {
        pos = 0;
        try {
          readLen = in.read(buffer);
        } catch (IOException e) {
          throw new RuntimeException();
        }
        if (readLen <= 0) {
          throw new MyInput.EndOfFileRuntimeException();
        }
      }
      return buffer[pos++];
    }

    public int nextInt() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      int i = 0;
      int ret = 0;
      if (str[0] == '-') {
        i = 1;
      }
      for (; i < len; i++)
        ret = ret * 10 + str[i] - '0';
      if (str[0] == '-') {
        ret = -ret;
      }
      return ret;
    }

    public long nextLong() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      int i = 0;
      long ret = 0;
      if (str[0] == '-') {
        i = 1;
      }
      for (; i < len; i++)
        ret = ret * 10 + str[i] - '0';
      if (str[0] == '-') {
        ret = -ret;
      }
      return ret;
    }

    public char nextChar() {
      while (true) {
        final int c = read();
        if (!isSpace[c]) {
          return (char) c;
        }
      }
    }

    public String nextString() {
      return new String(nextChars());
    }

    public char[] nextChars() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      return Arrays.copyOf(str, len);
    }

    public char[][] next2DChars(int h, int w) {
      char[][] s = new char[h][w];
      for (int i = 0; i < h; i++) {
        s[i] = nextChars();
      }
      return s;
    }

    int reads(int len, boolean[] accept) {
      try {
        while (true) {
          final int c = read();
          if (accept[c]) {
            break;
          }
          if (str.length == len) {
            char[] rep = new char[str.length * 3 / 2];
            System.arraycopy(str, 0, rep, 0, str.length);
            str = rep;
          }
          str[len++] = (char) c;
        }
      } catch (MyInput.EndOfFileRuntimeException e) {
      }
      return len;
    }

    public int[] nextIntArray(final int n) {
      final int[] res = new int[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextInt();
      }
      return res;
    }

    public int[] nextIntArray1Index(final int n) {
      final int[] res = new int[n + 1];
      for (int i = 1; i < n + 1; i++) {
        res[i] = nextInt();
      }
      return res;
    }

    public int[] nextIntArrayDec(final int n) {
      final int[] res = new int[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextInt() - 1;
      }
      return res;
    }

    public long[] nextLongArray(final int n) {
      final long[] res = new long[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextLong();
      }
      return res;
    }

    public long[] nextLongArray1Index(final int n) {
      final long[] res = new long[n + 1];
      for (int i = 1; i < n + 1; i++) {
        res[i] = nextLong();
      }
      return res;
    }

    public long[] nextLongArrayDec(final int n) {
      final long[] res = new long[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextLong() - 1;
      }
      return res;
    }

    public double nextDouble() {
      return Double.parseDouble(nextString());
    }

    public double[] nextDoubleArray(int n) {
      double[] res = new double[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextDouble();
      }
      return res;
    }

    static class EndOfFileRuntimeException extends RuntimeException {
    }

  }

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;

public class Main {

  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    MyInput in = new MyInput(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    TaskX solver = new TaskX();
    solver.solve(1, in, out);
    out.close();
  }

  static int INF = 1 << 30;
  static long LINF = 1L << 55;
  static int MOD = 1000000007;
  static int[] mh4 = {0, -1, 1, 0};
  static int[] mw4 = {-1, 0, 0, 1};
  static int[] mh8 = {-1, -1, -1, 0, 0, 1, 1, 1};
  static int[] mw8 = {-1, 0, 1, -1, 1, -1, 0, 1};

  static class TaskX {

    public void solve(int testNumber, MyInput in, PrintWriter out) {

      int n = in.nextInt(), m = in.nextInt();
      long[] f = new long[100010];
      boolean[] d = new boolean[100010];
      for (int i = 0; i < m; i++) {
        int a = in.nextInt();
        d[a] = true;
      }

      f[0] = 1;

      for (int i = 0; i < 100005; i++) {
        if (!d[i+1]) {
          f[i+1] += f[i];
          f[i+1] %= MOD;
        }

        if (!d[i+2]) {
          f[i+2] += f[i];
          f[i+2] %= MOD;
        }
      }

      out.println(f[n]);
    }
  }

  static class MyInput {
    private final BufferedReader in;
    private static int pos;
    private static int readLen;
    private static final char[] buffer = new char[1024 * 8];
    private static char[] str = new char[500 * 8 * 2];
    private static boolean[] isDigit = new boolean[256];
    private static boolean[] isSpace = new boolean[256];
    private static boolean[] isLineSep = new boolean[256];

    static {
      for (int i = 0; i < 10; i++) {
        isDigit['0' + i] = true;
      }
      isDigit['-'] = true;
      isSpace[' '] = isSpace['\r'] = isSpace['\n'] = isSpace['\t'] = true;
      isLineSep['\r'] = isLineSep['\n'] = true;
    }

    public MyInput(InputStream is) {
      in = new BufferedReader(new InputStreamReader(is));
    }

    public int read() {
      if (pos >= readLen) {
        pos = 0;
        try {
          readLen = in.read(buffer);
        } catch (IOException e) {
          throw new RuntimeException();
        }
        if (readLen <= 0) {
          throw new MyInput.EndOfFileRuntimeException();
        }
      }
      return buffer[pos++];
    }

    public int nextInt() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      int i = 0;
      int ret = 0;
      if (str[0] == '-') {
        i = 1;
      }
      for (; i < len; i++)
        ret = ret * 10 + str[i] - '0';
      if (str[0] == '-') {
        ret = -ret;
      }
      return ret;
    }

    public long nextLong() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      int i = 0;
      long ret = 0;
      if (str[0] == '-') {
        i = 1;
      }
      for (; i < len; i++)
        ret = ret * 10 + str[i] - '0';
      if (str[0] == '-') {
        ret = -ret;
      }
      return ret;
    }

    public char nextChar() {
      while (true) {
        final int c = read();
        if (!isSpace[c]) {
          return (char) c;
        }
      }
    }

    public String nextString() {
      return new String(nextChars());
    }

    public char[] nextChars() {
      int len = 0;
      str[len++] = nextChar();
      len = reads(len, isSpace);
      return Arrays.copyOf(str, len);
    }

    public char[][] next2DChars(int h, int w) {
      char[][] s = new char[h][w];
      for (int i = 0; i < h; i++) {
        s[i] = nextChars();
      }
      return s;
    }

    int reads(int len, boolean[] accept) {
      try {
        while (true) {
          final int c = read();
          if (accept[c]) {
            break;
          }
          if (str.length == len) {
            char[] rep = new char[str.length * 3 / 2];
            System.arraycopy(str, 0, rep, 0, str.length);
            str = rep;
          }
          str[len++] = (char) c;
        }
      } catch (MyInput.EndOfFileRuntimeException e) {
      }
      return len;
    }

    public int[] nextIntArray(final int n) {
      final int[] res = new int[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextInt();
      }
      return res;
    }

    public int[] nextIntArray1Index(final int n) {
      final int[] res = new int[n + 1];
      for (int i = 1; i < n + 1; i++) {
        res[i] = nextInt();
      }
      return res;
    }

    public int[] nextIntArrayDec(final int n) {
      final int[] res = new int[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextInt() - 1;
      }
      return res;
    }

    public long[] nextLongArray(final int n) {
      final long[] res = new long[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextLong();
      }
      return res;
    }

    public long[] nextLongArray1Index(final int n) {
      final long[] res = new long[n + 1];
      for (int i = 1; i < n + 1; i++) {
        res[i] = nextLong();
      }
      return res;
    }

    public long[] nextLongArrayDec(final int n) {
      final long[] res = new long[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextLong() - 1;
      }
      return res;
    }

    public double nextDouble() {
      return Double.parseDouble(nextString());
    }

    public double[] nextDoubleArray(int n) {
      double[] res = new double[n];
      for (int i = 0; i < n; i++) {
        res[i] = nextDouble();
      }
      return res;
    }

    static class EndOfFileRuntimeException extends RuntimeException {
    }

  }

}
