
target=0
o_list=[1,2]
n=0
t_list=[]
try:
    input1=[int(n) for n in input().split(' ')]
    target=input1[0]
    n=input1[1]
    for x range(n):
        t_list.append(int(x))
except:
  print('age,price must be numbers')
  sys.exit(1)

min_v = 10000
is_found = True
is_less = True
path=[0]
success = 0
d=1000000007
while(is_found or is_less):
    path_new=[]
    is_found=False
    is_less= False
    for i in o_list:
        for pre in path:
            new_n = i + pre
#             print(new_n)
            if not(new_n in t_list):
                if new_n < target:
                    is_less= True
                    path_new.append(new_n)
                if new_n == target:
                    success+=1
                    is_found=True
    if not is_found:
        path=[0]
    path = path_new
#     print(is_less)
#     print(is_found)
#     print("success")
#     print(success)
# print(success)
q, mod = divmod(success, d)
print(mod)