n,m = map(int,input().split())
a = list(range(m+2))
a[0] = -1
a[m+1] = n+1
ans = 1
for i in range(m):
  a[i+1] = int(input())
for i in range(m+1):
  if a[i]+1 == a[i+1]:
    ans = 0
  else:
    x = a[i+1]-a[i]-1
    ans = ans * 1/(5**0.5) * (((1+(5**0.5))/2)**x - ((1-(5**0.5))/2)**x)%1000000007

if m == 0:
    x = a[m+1]-a[i]-1
    ans = 1/(5**0.5) * (((1+(5**0.5))/2)**x - ((1-(5**0.5))/2)**x)%1000000007

print(ans)
