import sys

sys.setrecursionlimit(1000000)

MOD = 1000000007

state = [-1 for i in range(100010)]

def step_state(n, broken):
    if state[n] != -1:
        return state[n]

    if n == 0:
        state[0]=1
        return 1
    elif n == 1:
        if broken[1]:
            state[1]=0
            return 0
        else:
            state[1]=1
            return 1
    else:
        if broken[n - 1] and broken[n - 2]:
            state[n]=0
            return 0
        elif broken[n - 1]:
            state[n]=step_state(n-2, broken) % MOD
            return state[n]
        elif broken[n-2]:
            state[n] = step_state(n-1, broken) % MOD
            return state[n]
        else:
            state[n] = (step_state(n-1, broken)+step_state(n-2, broken)) % MOD
            return state[n]


if __name__ == '__main__':
    n, m = map(int, input().split())
    a = set([int(input()) for i in range(m)])
    broken = [False] * (n+1)
    for i in range(n+1):
        if i in a:
            broken[i] = True

    answer = step_state(n, broken)

    print(answer) import sys sys sys.setrecursionlimit(1000000) sys.setrecursionlimit sys setrecursionlimit 1000000 MOD = 1000000007 MOD 1000000007 -1 for i in range(100010) for i in range(100010) i range(100010) range 100010 for i in range(100010) -1 state = [-1 for i in range(100010)] state [-1 for i in range(100010)] def step_state(n, broken):
    if state[n] != -1:
        return state[n]

    if n == 0:
        state[0]=1
        return 1
    elif n == 1:
        if broken[1]:
            state[1]=0
            return 0
        else:
            state[1]=1
            return 1
    else:
        if broken[n - 1] and broken[n - 2]:
            state[n]=0
            return 0
        elif broken[n - 1]:
            state[n]=step_state(n-2, broken) % MOD
            return state[n]
        elif broken[n-2]:
            state[n] = step_state(n-1, broken) % MOD
            return state[n]
        else:
            state[n] = (step_state(n-1, broken)+step_state(n-2, broken)) % MOD
            return state[n] step_state if state[n] != -1:
        return state[n]

     state[n] != -1 state[n] state n -1 return state[n] state[n] state n if n == 0:
        state[0]=1
        return 1
    elif n == 1:
        if broken[1]:
            state[1]=0
            return 0
        else:
            state[1]=1
            return 1
    else:
        if broken[n - 1] and broken[n - 2]:
            state[n]=0
            return 0
        elif broken[n - 1]:
            state[n]=step_state(n-2, broken) % MOD
            return state[n]
        elif broken[n-2]:
            state[n] = step_state(n-1, broken) % MOD
            return state[n]
        else:
            state[n] = (step_state(n-1, broken)+step_state(n-2, broken)) % MOD
            return state[n] n == 0 n 0 state[0]=1 state[0] state 0 1 return 1 1 elif n == 1:
        if broken[1]:
            state[1]=0
            return 0
        else:
            state[1]=1
            return 1
     n == 1 n 1 if broken[1]:
            state[1]=0
            return 0
        else:
            state[1]=1
            return 1
     broken[1] broken 1 state[1]=0 state[1] state 1 0 return 0 0 state[1]=1 state[1] state 1 1 return 1 1 if broken[n - 1] and broken[n - 2]:
            state[n]=0
            return 0
        elif broken[n - 1]:
            state[n]=step_state(n-2, broken) % MOD
            return state[n]
        elif broken[n-2]:
            state[n] = step_state(n-1, broken) % MOD
            return state[n]
        else:
            state[n] = (step_state(n-1, broken)+step_state(n-2, broken)) % MOD
            return state[n] broken[n - 1] and broken[n - 2] broken[n - 1] broken n - 1 n 1 broken[n - 2] broken n - 2 n 2 state[n]=0 state[n] state n 0 return 0 0 elif broken[n - 1]:
            state[n]=step_state(n-2, broken) % MOD
            return state[n]
         broken[n - 1] broken n - 1 n 1 state[n]=step_state(n-2, broken) % MOD state[n] state n step_state(n-2, broken) % MOD step_state(n-2, broken) step_state n-2 n 2 broken MOD return state[n] state[n] state n elif broken[n-2]:
            state[n] = step_state(n-1, broken) % MOD
            return state[n]
         broken[n-2] broken n-2 n 2 state[n] = step_state(n-1, broken) % MOD state[n] state n step_state(n-1, broken) % MOD step_state(n-1, broken) step_state n-1 n 1 broken MOD return state[n] state[n] state n state[n] = (step_state(n-1, broken)+step_state(n-2, broken)) % MOD state[n] state n (step_state(n-1, broken)+step_state(n-2, broken)) % MOD step_state(n-1, broken)+step_state(n-2, broken) step_state(n-1, broken) step_state n-1 n 1 broken step_state(n-2, broken) step_state n-2 n 2 broken MOD return state[n] state[n] state n n n broken broken if __name__ == '__main__':
    n, m = map(int, input().split())
    a = set([int(input()) for i in range(m)])
    broken = [False] * (n+1)
    for i in range(n+1):
        if i in a:
            broken[i] = True

    answer = step_state(n, broken)

    print(answer) __name__ == '__main__' __name__ '__main__' n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m int(input()) for i in range(m) for i in range(m) i range(m) range m for i in range(m) int(input()) int input() input a = set([int(input()) for i in range(m)]) a set([int(input()) for i in range(m)]) set [int(input()) for i in range(m)] broken = [False] * (n+1) broken [False] * (n+1) [False] False n+1 n 1 for i in range(n+1):
        if i in a:
            broken[i] = True

     i range(n+1) range n+1 n 1 if i in a:
            broken[i] = True

     i in a i a broken[i] = True broken[i] broken i True answer = step_state(n, broken) answer step_state(n, broken) step_state n broken print(answer) print answer def step_state(n, broken):
    if state[n] != -1:
        return state[n]

    if n == 0:
        state[0]=1
        return 1
    elif n == 1:
        if broken[1]:
            state[1]=0
            return 0
        else:
            state[1]=1
            return 1
    else:
        if broken[n - 1] and broken[n - 2]:
            state[n]=0
            return 0
        elif broken[n - 1]:
            state[n]=step_state(n-2, broken) % MOD
            return state[n]
        elif broken[n-2]:
            state[n] = step_state(n-1, broken) % MOD
            return state[n]
        else:
            state[n] = (step_state(n-1, broken)+step_state(n-2, broken)) % MOD
            return state[n] def step_state(n, broken):
    if state[n] != -1:
        return state[n]

    if n == 0:
        state[0]=1
        return 1
    elif n == 1:
        if broken[1]:
            state[1]=0
            return 0
        else:
            state[1]=1
            return 1
    else:
        if broken[n - 1] and broken[n - 2]:
            state[n]=0
            return 0
        elif broken[n - 1]:
            state[n]=step_state(n-2, broken) % MOD
            return state[n]
        elif broken[n-2]:
            state[n] = step_state(n-1, broken) % MOD
            return state[n]
        else:
            state[n] = (step_state(n-1, broken)+step_state(n-2, broken)) % MOD
            return state[n] step_state m = map(int, input().split()) map(int, input().split()) m broken = [False] * (n+1) [False] * (n+1) broken n, m = map(int, input().split()) map(int, input().split()) n a = set([int(input()) for i in range(m)]) set([int(input()) for i in range(m)]) a MOD = 1000000007 1000000007 MOD answer = step_state(n, broken) step_state(n, broken) answer state = [-1 for i in range(100010)] [-1 for i in range(100010)] state
import sys

sys.setrecursionlimit(1000000)

MOD = 1000000007

state = [-1 for i in range(100010)]

def step_state(n, broken):
    if state[n] != -1:
        return state[n]

    if n == 0:
        state[0]=1
        return 1
    elif n == 1:
        if broken[1]:
            state[1]=0
            return 0
        else:
            state[1]=1
            return 1
    else:
        if broken[n - 1] and broken[n - 2]:
            state[n]=0
            return 0
        elif broken[n - 1]:
            state[n]=step_state(n-2, broken) % MOD
            return state[n]
        elif broken[n-2]:
            state[n] = step_state(n-1, broken) % MOD
            return state[n]
        else:
            state[n] = (step_state(n-1, broken)+step_state(n-2, broken)) % MOD
            return state[n]


if __name__ == '__main__':
    n, m = map(int, input().split())
    a = set([int(input()) for i in range(m)])
    broken = [False] * (n+1)
    for i in range(n+1):
        if i in a:
            broken[i] = True

    answer = step_state(n, broken)

    print(answer)
