P = 10**9 + 7

class UnionFind():
    def __init__(self, n):
        self.par = [i for i in range(n)]
        self.rank = [0] * n

    def root(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.root(self.par[x])
            return self.par[x]

    def union(self, x, y):
        x = self.root(x)
        y = self.root(y)
        if x != y:
            if self.rank[x] < self.rank[y]:
                self.par[x] = y
            else:
                self.par[y] = x
                if self.rank[x] == self.rank[y]:
                    self.rank[x] += 1

    def samegrp(self, x, y):
        return self.root(x) == self.root(y)

N, M = [int(x) for x in input().split()]
X = UnionFind(N + 1)
for i in range(M):
    X.union(0, int(input()))

dp = [0]*(N + 1)
dp[0] = 1
if X.samegrp(0, 1):
    dp[1] = 0
else:
    dp[1] = 1
for i in range(2, N + 1):
    if X.samegrp(0, i):
        dp[i] = 0
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % P

ans = dp[N]
print(ans) P = 10**9 + 7 P 10**9 + 7 10**9 10 9 7 class UnionFind():
    def __init__(self, n):
        self.par = [i for i in range(n)]
        self.rank = [0] * n

    def root(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.root(self.par[x])
            return self.par[x]

    def union(self, x, y):
        x = self.root(x)
        y = self.root(y)
        if x != y:
            if self.rank[x] < self.rank[y]:
                self.par[x] = y
            else:
                self.par[y] = x
                if self.rank[x] == self.rank[y]:
                    self.rank[x] += 1

    def samegrp(self, x, y):
        return self.root(x) == self.root(y) UnionFind def __init__(self, n):
        self.par = [i for i in range(n)]
        self.rank = [0] * n

     __init__ i for i in range(n) for i in range(n) i range(n) range n for i in range(n) i self.par = [i for i in range(n)] self.par self par [i for i in range(n)] self.rank = [0] * n self.rank self rank [0] * n [0] 0 n self self n n def root(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.root(self.par[x])
            return self.par[x]

     root if self.par[x] == x:
            return x
        else:
            self.par[x] = self.root(self.par[x])
            return self.par[x]

     self.par[x] == x self.par[x] self.par self par x x return x x self.par[x] = self.root(self.par[x]) self.par[x] self.par self par x self.root(self.par[x]) self.root self root self.par[x] self.par self par x return self.par[x] self.par[x] self.par self par x self self x x def union(self, x, y):
        x = self.root(x)
        y = self.root(y)
        if x != y:
            if self.rank[x] < self.rank[y]:
                self.par[x] = y
            else:
                self.par[y] = x
                if self.rank[x] == self.rank[y]:
                    self.rank[x] += 1

     union x = self.root(x) x self.root(x) self.root self root x y = self.root(y) y self.root(y) self.root self root y if x != y:
            if self.rank[x] < self.rank[y]:
                self.par[x] = y
            else:
                self.par[y] = x
                if self.rank[x] == self.rank[y]:
                    self.rank[x] += 1

     x != y x y if self.rank[x] < self.rank[y]:
                self.par[x] = y
            else:
                self.par[y] = x
                if self.rank[x] == self.rank[y]:
                    self.rank[x] += 1

     self.rank[x] < self.rank[y] self.rank[x] self.rank self rank x self.rank[y] self.rank self rank y self.par[x] = y self.par[x] self.par self par x y self.par[y] = x self.par[y] self.par self par y x if self.rank[x] == self.rank[y]:
                    self.rank[x] += 1

     self.rank[x] == self.rank[y] self.rank[x] self.rank self rank x self.rank[y] self.rank self rank y self.rank[x] += 1 self.rank[x] self.rank self rank x 1 self self x x y y def samegrp(self, x, y):
        return self.root(x) == self.root(y) samegrp return self.root(x) == self.root(y) self.root(x) == self.root(y) self.root(x) self.root self root x self.root(y) self.root self root y self self x x y y int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x N, M = [int(x) for x in input().split()] N [int(x) for x in input().split()] M X = UnionFind(N + 1) X UnionFind(N + 1) UnionFind N + 1 N 1 for i in range(M):
    X.union(0, int(input())) i range(M) range M X.union(0, int(input())) X.union X union 0 int(input()) int input() input dp = [0]*(N + 1) dp [0]*(N + 1) [0] 0 N + 1 N 1 dp[0] = 1 dp[0] dp 0 1 if X.samegrp(0, 1):
    dp[1] = 0
else:
    dp[1] = 1 X.samegrp(0, 1) X.samegrp X samegrp 0 1 dp[1] = 0 dp[1] dp 1 0 dp[1] = 1 dp[1] dp 1 1 for i in range(2, N + 1):
    if X.samegrp(0, i):
        dp[i] = 0
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % P i range(2, N + 1) range 2 N + 1 N 1 if X.samegrp(0, i):
        dp[i] = 0
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % P X.samegrp(0, i) X.samegrp X samegrp 0 i dp[i] = 0 dp[i] dp i 0 dp[i] = (dp[i - 1] + dp[i - 2]) % P dp[i] dp i (dp[i - 1] + dp[i - 2]) % P dp[i - 1] + dp[i - 2] dp[i - 1] dp i - 1 i 1 dp[i - 2] dp i - 2 i 2 P ans = dp[N] ans dp[N] dp N print(ans) print ans P = 10**9 + 7 10**9 + 7 P N, M = [int(x) for x in input().split()] [int(x) for x in input().split()] N X = UnionFind(N + 1) UnionFind(N + 1) X ans = dp[N] dp[N] ans M = [int(x) for x in input().split()] [int(x) for x in input().split()] M dp = [0]*(N + 1) [0]*(N + 1) dp class UnionFind():
    def __init__(self, n):
        self.par = [i for i in range(n)]
        self.rank = [0] * n

    def root(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.root(self.par[x])
            return self.par[x]

    def union(self, x, y):
        x = self.root(x)
        y = self.root(y)
        if x != y:
            if self.rank[x] < self.rank[y]:
                self.par[x] = y
            else:
                self.par[y] = x
                if self.rank[x] == self.rank[y]:
                    self.rank[x] += 1

    def samegrp(self, x, y):
        return self.root(x) == self.root(y) class UnionFind():
    def __init__(self, n):
        self.par = [i for i in range(n)]
        self.rank = [0] * n

    def root(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.root(self.par[x])
            return self.par[x]

    def union(self, x, y):
        x = self.root(x)
        y = self.root(y)
        if x != y:
            if self.rank[x] < self.rank[y]:
                self.par[x] = y
            else:
                self.par[y] = x
                if self.rank[x] == self.rank[y]:
                    self.rank[x] += 1

    def samegrp(self, x, y):
        return self.root(x) == self.root(y) UnionFind
P = 10**9 + 7

class UnionFind():
    def __init__(self, n):
        self.par = [i for i in range(n)]
        self.rank = [0] * n

    def root(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.root(self.par[x])
            return self.par[x]

    def union(self, x, y):
        x = self.root(x)
        y = self.root(y)
        if x != y:
            if self.rank[x] < self.rank[y]:
                self.par[x] = y
            else:
                self.par[y] = x
                if self.rank[x] == self.rank[y]:
                    self.rank[x] += 1

    def samegrp(self, x, y):
        return self.root(x) == self.root(y)

N, M = [int(x) for x in input().split()]
X = UnionFind(N + 1)
for i in range(M):
    X.union(0, int(input()))

dp = [0]*(N + 1)
dp[0] = 1
if X.samegrp(0, 1):
    dp[1] = 0
else:
    dp[1] = 1
for i in range(2, N + 1):
    if X.samegrp(0, i):
        dp[i] = 0
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % P

ans = dp[N]
print(ans)