Harryxun/stf_run huggingface dataset:
import statistics
import math

N=int(input())
A=[int(x) for x in input().split()]
def ka(b):
  k=0
  for i in range(N):
    k += abs(A[i]-(b+i+1))
  return k

B=[]
for j in range(N):
  B +=[A[j]-j-1]
B=sorted(B)

result=float('inf')
for k in range(B[N//2],B[N//2+2]):
  result =min(result,ka(k))
print(result)


### FIXED CODE ###

import numpy as np
N=int(input())
A=[int(X) for X in input().split()]
B=[]
for i in range(N):
  B +=[A[i]-1-i]
B = np.array(sorted(B))
x = B[N//2]
answer = np.abs(B-x).sum()
print(answer)
n = int(input())
min = 1000000; max = -1000000; sum = 0;

for i in range(n):
    x = int(input())
    sum += x
    if min > x:
        min = x
    if max < x:
        max = x
print('{0} {1} {2}'.format(min,max,sum))




### FIXED CODE ###

n = int(input())
data = list(map(int,input().split()))
print('{0} {1} {2}'.format(min(data),max(data),sum(data)))
import fractions

A, B, C = map(int, input().split())
ab = fractions.gcd(A, B)
if C % temp == 0:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

import fractions

A, B, C = map(int, input().split())
ab = fractions.gcd(A, B)
temp = fractions.gcd(A, ab)
if C % temp == 0:
    print("YES")
else:
    print("NO")
N, M, C = map(int, input().split())
B = []
A = []

B.append(map(int, input().split())
for i in range(N):
	A.append(list(map(int, input().split())))


sum = 0
count = 0

for i in range(N):
	sum = 0
	for j in range(M):
		sum += A[i][j]
		sum += B[j]
	sum += C
	if sum > 0:
		count += 1

print(sum)

### FIXED CODE ###

# ファイルをオープンする
#test_data = open("test.txt", "r")

# 行ごとにすべて読み込んでリストデータにする
#line = test_data.readline()


#N, M, C = map(int, line.split())
N, M, C = map(int, input().split())
B = []
A = []

#line = test_data.readline()


#B = [int(b) for b in line.split()]
B = [int(b) for b in input().split()]
for i in range(N):
	A.append(list(map(int, input().split())))
	#line = test_data.readline()
	#A.append(list(map(int, line.split())))

sum = 0
count = 0

for i in range(N):
	sum = 0
	for j in range(M):
		sum += A[i][j] * B[j]
	sum += C
	if sum > 0:
		count += 1

print(count)
from _collections import deque
N, K = map(int, input().split())
A = input().split()
A = [int(a) for a in A]
S = []
a = 1
number = 0
for _ in range(N + 1):
    b = A[a - 1]
    if b in S:
        c = deque(S).index(b)
        break
    number += 1
    S.append(b)
    a = b
T = S[c:number]
if K <= N:
    print(S[K - 1])
else:
    z = K - c - 1
    y = z % (number - c)
    print(T[y])


### FIXED CODE ###

N, K = map(int, input().split())
A = input().split()
A = [int(a) for a in A]
S = [1]
a = 1
number = 0
numbers=[-1 for _ in range(N)]
for _ in range(N + 1):
    b = A[a - 1]
    if numbers[b-1] != -1:
      c=numbers[b-1]
      break
    numbers[b-1]=number
    number += 1
    S.append(b)
    a = b
T = S[c+1:number+1]
if K <= number:
  print(S[K ])
else:
  z = K - c-1
  y = z % (number - c)
  print(T[y])
N, M = map(int, input().split())
dp = [0 for _ in range(N+1)]
skip = {}

for _ in range(M):
    skip[int(input())] = 1

dp[1] = 1
dp[2] = 2

if 1 in skip:
    dp[1] = 0
    dp[2] = 1
if 2 in skip:
    dp[2] = 0

for i in range(3, N+1):
    if i in skip:
        continue
    dp[i] = (dp[i-1] + dp[i-2]) % 1000000007

print(dp[N])


### FIXED CODE ###

N, M = map(int, input().split())
dp = [0 for _ in range(N+1)]
skip = {}

for _ in range(M):
    skip[int(input())] = 1

dp[0] = 1
if 1 not in skip:
    dp[1] = 1

for i in range(2, N+1):
    if i in skip:
        continue
    dp[i] += (dp[i-1] + dp[i-2]) % 1000000007

print(dp[N])
import math
n = int(raw_input())
a = list(map(int,raw_input().split()))
g = 0
for i in range(len(a)):
    g = math.gcd(g,a[i])
print(g)


### FIXED CODE ###

def gcd(x, y): 
  
   while(y): 
       x, y = y, x % y 
  
   return x 
n = int(input())
a = list(map(int,input().split()))
g = 0
for i in range(len(a)):
    g = gcd(g,a[i])
print(g)
x = input()
y = x ** 3
print(y)


### FIXED CODE ###


x = int(input())
print(x*x*x)
# B-Checkpoints
# 問題URL:http://abc057.contest.atcoder.jp/tasks/abc057_b

N, M = map(int, input().split()) #まずNとMを取得
ABs = [] # 学生のいる座標
CDs = [] #　チェックポイントの座標

# 2行目よりN行分学生の座標を取得してABsに格納
for i in range(N):
    ABs.append([int(x) for x in input().split()])

# 2+N行目よりM行分チェックポイントの座標を取得してCDsに格納
for i in range(N):
    CDs.append([int(x) for x in input().split()])

for a,b in ABs:
    #ABsの中身をa,b、CDsの中身をc,dとして取り出し各チェックポイントごとの距離を測定
    distance = [abs(a-c) + abs(b-d) for c,d in CDs]
    print(distance)
    
    #　距離が同じ場合は最も番号が早いものを出力する。=(min()はもともとそのようにできている。早いもの優先）
    #+1はリストは0番目から、チェックポイントは1番目から始まるため
    print(distance.index(min(distance)) + 1)


### FIXED CODE ###

# B-Checkpoints
# 問題URL:http://abc057.contest.atcoder.jp/tasks/abc057_b

N, M = map(int, input().split()) #まずNとMを取得
ABs = [] # 学生のいる座標
CDs = [] #　チェックポイントの座標

# 2行目よりN行分学生の座標を取得してABsに格納
for i in range(N):
    ABs.append([int(x) for x in input().split()])

# 2+N行目よりM行分チェックポイントの座標を取得してCDsに格納
for i in range(M):
    CDs.append([int(x) for x in input().split()])

for a,b in ABs:
    #ABsの中身をa,b、CDsの中身をc,dとして取り出し各チェックポイントごとの距離を測定
    distance = [abs(a-c) + abs(b-d) for c,d in CDs]
    
    #　距離が同じ場合は最も番号が早いものを出力する。=(min()はもともとそのようにできている。早いもの優先）
    #+1はリストは0番目から、チェックポイントは1番目から始まるため
    print(distance.index(min(distance)) + 1)
from collections import Counter

n = int(input())
c = Counter()
for i in range(n):
    tmp = input().strip()
    if tmp[0] in ['M', 'A', 'R', 'C', 'H']:
        c[tmp[0]] += 1

result = 0
for v in itertools.permutations(c.values(), 3):
    result += v[0] * v[1] * v[2]

print(result // 6)




### FIXED CODE ###

import itertools
from collections import Counter

n = int(input())
c = Counter()
for i in range(n):
    tmp = input().strip()
    if tmp[0] in ['M', 'A', 'R', 'C', 'H']:
        c[tmp[0]] += 1

result = 0
for v in itertools.permutations(c.values(), 3):
    result += v[0] * v[1] * v[2]

print(result // 6)
a,b = (int(i) for i in input().split()) 
if a == b:
  print(a + b):
else:
  s = max(a, b)
  print(s + s -1)

### FIXED CODE ###

a,b = (int(i) for i in input().split()) 
if a == b:
  print(a + b)
else:
  s = max(a, b)
  print(s + s -1)
print("YES" if input() == "3" or input() == "5" or input() == "7" else "NO") 

### FIXED CODE ###

n = input()
print("YES" if n == "3" or n == "5" or n == "7" else "NO")
list=input().rstrip
if list[2]==list[3] and list[4]==list[5]:
	print("Yes")
else:
	print("No")
 

### FIXED CODE ###

list=input().rstrip()
if list[2]==list[3] and list[4]==list[5]:
  print("Yes")
else:
  print("No")
from sys import stdin
N = str(stdin.readline().rstrip())
i = 0
takahasi = 0
while i < 4:
  if S[i:i+1] == "+":
    takahasi += 1
  elif S[i:i+1] == "-":
    takahasi -= 1
  i += 1
print(takahasi)

### FIXED CODE ###

from sys import stdin
S = str(stdin.readline().rstrip())
i = 0
takahasi = 0
while i < 4:
  if S[i:i+1] == "+":
    takahasi += 1
  elif S[i:i+1] == "-":
    takahasi -= 1
  i += 1
print(takahasi)
N, M = map(int, input().split())
A, B = [], []
dic = {i:[] for i in range(1, N+1)}
for _ in range(M):
    a, b = map(int, input().split())
    dic[a].append(b)
    dic[b].append(a)

node = [float('inf')] * N
node[0] = 0 #1までの距離
route = [0]*N #ランプ置く部屋
rooms = [1] #次調べる部屋

for r1 in rooms:
    for r2 in dic[r1]:
        if node[r1-1] + 1 <= node[r2-1]:
            node[r2-1] = node[r1-1] + 1
            route[r2-1] = r1
            rooms.append(r2)
            dic[r2].remove(r1)

if float('inf') in node:
    print('No')
else:
    print('Yes')
    for i in route[1:]:
        print(i)


### FIXED CODE ###

N, M = map(int, input().split())
A, B = [], []
dic = {i:[] for i in range(1, N+1)}
for _ in range(M):
    a, b = map(int, input().split())
    dic[a].append(b)
    dic[b].append(a)

node = [float('inf')] * N
node[0] = 0 #1までの距離
route = [0]*N #ランプ置く部屋
rooms = [1] #次調べる部屋
st = {1}

for r1 in rooms:
    for r2 in dic[r1]:
        if node[r1-1] + 1 <= node[r2-1]:
            node[r2-1] = node[r1-1] + 1
            route[r2-1] = r1
            if not r2 in st:
                rooms.append(r2)
                st.add(r2)
            try:
                dic[r2].remove(r1)
            except:
                continue

if float('inf') in node:
    print('No')
else:
    print('Yes')
    for i in route[1:]:
        print(i)
N, M = list(map(int, input().split()))
A = list(map(int, input().split()))

real = A[M] / sum(A)
ideal = 1 / (4 * M)

if real >= ideal:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

N, M = list(map(int, input().split()))
A = list(map(int, input().split()))

A.sort(reverse = True)
real = A[M-1] / sum(A)
ideal = 1 / (4 * M)

if real >= ideal:
    print("Yes")
else:
    print("No")
A, B, K = map(int, input().split())
lst = list(range(A, B+1))
ans = lst[:K] + lst[-K:]
for i in ans:
  print(i)

### FIXED CODE ###

A, B, K = map(int, input().split())
lst1 = list(range(A, min(A+K, B+1)))
lst2 = list(range(max(B-K+1, A), B+1))
ans = set(lst1 + lst2)
ans = list(sorted(ans))
for i in ans:
  print(i)
H,W=map(int,input().split())
S=["."*W]+["."+input()+"." for i in range(H)]+["."*W]
for i in range(1,H+1):
    for j in range(1,W+1):
        if S[i][j]=="#":
            if S[i+1][j]=="." and S[i-1][j]=="." and S[i][j-1]=="." and S[i][j+1]==".":
                print("No")
                exit()
print("Yes")

### FIXED CODE ###

H,W=map(int,input().split())
S=["."*(W+2)]+["."+input()+"." for i in range(H)]+["."*(W+2)]
for i in range(1,H+1):
    for j in range(1,W+1):
        if S[i][j]=="#":
            if S[i+1][j]=="." and S[i-1][j]=="." and S[i][j-1]=="." and S[i][j+1]==".":
                print("No")
                exit()
print("Yes")
n=input()
a = input()+input()
print(a[::2]+a[1::2])

### FIXED CODE ###

n=input()
ans=''
for i,j in zip(*input().split()):
    ans+=i+j
print(ans)
import math
a,b = map(int,input().split())

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(a, b))

### FIXED CODE ###

import math
import fractions
a,b = map(int,input().split())

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

print(lcm(a, b))
n, m = map(int, input().split())
a = list(map(int, input().split()))
bc = [tuple(map(int, input().split())) for i in range(m)]
a.sort()
bc.sort(key=lambda x: -x[1])
# print(a)
# print(bc)

count = 0
idx = -1
end = False
for b, c in bc:
  if idx + b >= n and a[idx+b] < c:
    count += b * c
    idx += b
  else:
    for i in range(idx+1, idx+1+b):
      if i >= n or end:
        break
      else:
        if a[i] < c:
          count += c
          idx += 1
        else:
          end = True
  # print((idx, count))
  if end:
    break

if idx <= n-2:
  count += sum(a[idx+1:])

print(count)


### FIXED CODE ###

n, m = map(int, input().split())
a = list(map(int, input().split()))
bc = [tuple(map(int, input().split())) for i in range(m)]
a.sort()
bc.sort(key=lambda x: -x[1])
# print(a)
# print(bc)

count = 0
idx = -1
end = False
for b, c in bc:
  if idx + b <= n-1 and a[idx+b] < c:
    count += b * c
    idx += b
  else:
    for i in range(idx+1, idx+1+b):
      if i >= n or end:
        break
      else:
        if a[i] < c:
          count += c
          idx += 1
        else:
          end = True
  # print((idx, count))
  if end:
    break

if idx <= n-2:
  count += sum(a[idx+1:])

print(count)
N = int(input())

array = []

for i in range(N):
    array.append(list(map(int,input().split())))

test = []

t = []

for x in range(101):
    for y in range(101):
        H = []
        for i in array:
            if i[2] > 0:
                H_i = max(abs(i[0]-x)+abs(i[1]-y)+i[2],0)
                H.append(H_i)
        Hset = set(H)
        H = list(Hset)[0]
        if(len(Hset)==1 and H>=0):
            t.append([x,y,H])

t = []

if len(t) >=2:
    for x in range(101):
        for y in range(101):
            H = []
            for i in array:
                if True:
                    H_i = max(abs(i[0]-x)+abs(i[1]-y)+i[2],0)
                    H.append(H_i)
            Hset = set(H)
            H = list(Hset)[0]
            if(len(Hset)==1 and H>=0):
                t.append([x,y,H])
            
print("{0[0]} {0[1]} {0[2]}".format(t[0]))


### FIXED CODE ###

N = int(input())

array = []

for i in range(N):
    array.append(list(map(int,input().split())))

test = []

t = []

for x in range(101):
    for y in range(101):
        H = []
        for i in array:
            if i[2] > 0:
                H_i = max(abs(i[0]-x)+abs(i[1]-y)+i[2],0)
                H.append(H_i)
        Hset = set(H)
        H = list(Hset)[0]
        if(len(Hset)==1 and H>=0):
            t.append([x,y,H])

if len(t) >= 2:
    t = []
    for x in range(101):
        for y in range(101):
            H = []
            for i in array:
                if True:
                    H_i = max(abs(i[0]-x)+abs(i[1]-y)+i[2],0)
                    H.append(H_i)
            Hset = set(H)
            H = list(Hset)[0]
            if(len(Hset)==1 and H>=0):
                t.append([x,y,H])
            
print("{0[0]} {0[1]} {0[2]}".format(t[0]))
input()
lst = list(map(int,input().split()))
for i in range(len(lst)):
    j = i - 1
    while (j >= 0) * (lst[j] > lst[i]):
        j -= 1
    lst[j+1:i+1] = lst[i] , *lst[j+1:i]
    print(*lst)

### FIXED CODE ###

n = int(input())
lst = list(map(int, input().split()))
for i in range(n):
    li = lst[i]
    j = i-1
    while j >= 0 and lst[j] > li:
        lst[j:j+2] = lst[j+1], lst[j]
        j -= 1
    print(*lst)
#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    a, b = LI()
    if a <= 8 and b <= 8:
        print("Yay!")
    else:
        print(":(")
    return

#B
def B():
    d, n = LI()
    print(str(n * (n != 100) or n + 1) + "00" * d)
    return

#C
def C():
    II()
    ans = 0
    a = LI()
    for ai in a:
        if not a % 2:
            ans += a // 2
    print(ans)
    return

#D
def D():
    return

#Solve
if __name__ == '__main__':
    C()


### FIXED CODE ###

#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    a, b = LI()
    if a <= 8 and b <= 8:
        print("Yay!")
    else:
        print(":(")
    return

#B
def B():
    d, n = LI()
    print(str(n * (n != 100) or n + 1) + "00" * d)
    return

#C
def C():
    II()
    ans = 0
    a = LI()
    for ai in a:
        while not ai % 2:
            ans += 1
            ai = ai // 2
    print(ans)
    return

#D
def D():
    return

#Solve
if __name__ == '__main__':
    C()
#coding: utf-8
import numpy as np

N, A, B, C = map(int, input().split())
bumboo = np.array([int(input()) for _ in range(N)])
magic = 0
for i in [A, B, C]:
    bumboo_diff = bumboo - i
    bumboo_diff = np.where(bumboo_diff >= 0)
    if np.sum(bumboo_diff) >= 2:
        magic += 10
    else:
        magic += np.min(bumboo_diff)
print(magic)

### FIXED CODE ###

# coding: utf-8
def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out
    
N, A, B, C = map(int, input().split())
L = [int(input()) for _ in range(N)]
ans = float("inf")
for i in range(4**N):
    bits = Base_10_to_n(i, 4).zfill(N)
    a, b, c = 0, 0, 0
    cost = 0
    for j in range(len(bits)):
        if bits[j] == "0":
            pass
        elif bits[j] == "1":
            a += L[j]
            cost += 10
        elif bits[j] == "2":
            b += L[j]
            cost += 10
        else:
            c += L[j]
            cost += 10
    if min(a, b, c) > 0:
        ans = min(ans, cost + abs(a-A)+abs(b-B)+abs(c-C) - 10*3)
print(ans)
int x
x = Input()

x = x*x*x

print(x)


### FIXED CODE ###

x = input()
print x**3
int(input(h:4, m:0, s:0,))

### FIXED CODE ###

S = int(input()) 
print(S // 3600, ":", S % 3600 // 60, ":", S % 60, sep = "")
n,k=map(int,input().split())
ans=[]
for i in range(n):
    ans.append(int(input()))
ans.sort()
print(min(ans[i+k-1]-ans[i] for j in range(n-k+1)))



### FIXED CODE ###

n,k=map(int,input().split())
ans=[]
for i in range(n):
    ans.append(int(input()))
ans.sort()
print(min(ans[j+k-1]-ans[j] for j in range(n-k+1)))
#!/usr/bin/env python3
import sys
from itertools import groupby

# RUN LENGTH ENCODING
def runLengthEncode(S: str):
    grouped = groupby(S)
    res = []
    for k, v in grouped:
        res.append((k, str(len(list(v)))))
    return res

def runLengthdecode(L: "list[tuple]"):
    res = ""
    for c, n in L:
        res += c * int(n)
    return res

# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    N, K = map(int, input().split())
    S = input()
    compressed = runLengthEncode(S)

    # ある区間を反転させるとその両端が前後で連結するようにするのが最大化できる = 両端の操作は損
    for k in range(K):
        i = 2 * k + 1   # 奇数インデックスのみ反転させる。
        compressed[i] = ('L', compressed[i][1]) if compressed[i][0] == "R" else ('R', compressed[i][1])

    reCompressed = runLengthEncode(runLengthdecode(compressed))
    ans = N - len(reCompressed)
    
    print(ans)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
from itertools import groupby

# RUN LENGTH ENCODING
def runLengthEncode(S: str):
    grouped = groupby(S)
    res = []
    for k, v in grouped:
        res.append((k, str(len(list(v)))))
    return res

def runLengthdecode(L: "list[tuple]"):
    res = ""
    for c, n in L:
        res += c * int(n)
    return res

# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    N, K = map(int, input().split())
    S = input()
    compressed = runLengthEncode(S)

    # ある区間を反転させるとその両端が前後で連結するようにするのが最大化できる = 両端の操作は損
    for k in range(K):
        i = 2 * k + 1   # 奇数インデックスのみ反転させる。
        if i >= len(compressed):
            break
        compressed[i] = ('L', compressed[i][1]) if compressed[i][0] == "R" else ('R', compressed[i][1])

    reCompressed = runLengthEncode(runLengthdecode(compressed))
    ans = N - len(reCompressed)

    print(ans)

if __name__ == '__main__':
    main()
N = int(input())

D = [int(a) for a in input().split() ]

if D[0] != 0 or D.count(0) !=1:
    print("0")
    exit()

D.sort()
#D = D[1:]
m = max(D)
counted = []

for i in range(1,m):
    c = D.count(i)
    if c != 0:
        counted.append(c)

#calc
result = 1
x = counted[0]
for i in range(1,len(counted)):
    y = counted[i]
    result = result * pow(x,y)
    x = y
print(result%998244353)


### FIXED CODE ###

import collections
N = int(input())

D = [int(a) for a in input().split() ]

counted = collections.Counter(D)

if D[0] != 0 or counted[0] !=1:
    print("0")
    exit()

#calc
result = 1
x = counted[1]
for i in range(2,N+1):
    y = counted[i]
    result = result * pow(x,y) %998244353
    x = y
print(result)
n = input()

n_list = list(n)
ans = sum(n_list)

print("Yes" if (ans % 9) == 0 else "No")

### FIXED CODE ###

import math

n = input()

n_list = map(int, list(n))
ans = sum(n_list)

print("Yes" if (ans % 9) == 0 else "No")
s = input()

for i in len(s):
  print(x, '')

### FIXED CODE ###

s = input()
a = '' 
for i in range(len(s)):
  a = a + 'x'

print(a)
import math
A,B,C,D = (int(i) for i in input().split())

X = (C * D) // math.gcd(C, D)
Y = (C + D) // math.gcd(C, D) - 1

print(X,Y)

#count = (B - A) // X * Y 
#print(count)


N = A % X 
N_S = N-1
UA = Y - (N_S // C + N_S // D)

print(UA)
M = B % X
UB = M // C + M // D
if M == 0:
    UB = 0
print(UB)


SA =  A + ( X - N )
SB =  B - M 
print(SA,SB)
count = (SB - SA) // X * Y 

print(count)
add = count + UA + UB
    
Z = B - A - add + 1
print(Z)

### FIXED CODE ###

import fractions
a,b,c,d = map(int,input().split())
e = c * d // fractions.gcd(c,d)

c_count = b // c - (a - 1) // c
d_count = b // d - (a - 1) // d
e_count = b // e - (a - 1) // e

ans = b - a + 1 - c_count - d_count + e_count
print(ans)
a,b = map(str,input().split())
a2 = int(a)
b2 = 100*int(b[0:1])+10*int(b[2:3])+int(b[3:4])
if a2 == 0 or b2 == 0:
    ans = 0
else:
    tmp = str(a2*b2)
    l = len(tmp)
    ans = int(tmp[0:l-2])
print(ans)


### FIXED CODE ###

a,b = map(str,input().split())
a2 = int(a)
b2 = 100*int(b[0:1])+10*int(b[2:3])+int(b[3:4])
if a2 == 0 or b2 == 0:
    ans = 0
else:
    tmp = str(a2*b2)
    l = len(tmp)
    if l <= 2:
        ans = 0
    else:
        ans = int(tmp[0:l-2])
print(ans)
from fractions import gcd

a,b = map(int,input().split())

print(int(a*b/gcd(a,b)))

### FIXED CODE ###

a = int(input())
b = int(input())

print(6-a-b)
n,m=map(int,input().split())
A=[int(input()) for i in range(m)]
NG=[0]*10**5
for i in range(m):
    NG[A[i]]=1
import sys
mod=10**9+7 ; inf=float("inf")
from math import sqrt, ceil
from collections import deque, Counter, defaultdict #すべてのkeyが用意されてる defaultdict(int)で初期化
input=lambda: sys.stdin.readline().strip()
sys.setrecursionlimit(11451419)
from decimal import ROUND_HALF_UP,Decimal  #変換後の末尾桁を0や0.01で指定
  #Decimal((str(0.5)).quantize(Decimal('0'), rounding=ROUND_HALF_UP))
from functools import lru_cache
from bisect import bisect_left as bileft, bisect_right as biright
#メモ化再帰defの冒頭に毎回 @lru_cache(maxsize=10**10)
#引数にlistはだめ
#######ここまでテンプレ#######
#ソート、"a"+"b"、再帰ならPython3の方がいい
#######ここから天ぷら########

@lru_cache(maxsize=10**10)
def qwe(x):
    if x==n:return 1
    if x>n:return 0
    if NG[x+1] and NG[x+2]: print(0);exit()
    if NG[x+1]:return qwe(x+2)%mod
    if NG[x+2]:return qwe(x+1)%mod
    return (qwe(x+2)+qwe(x+1))%mod
print(qwe(0))
    



    

### FIXED CODE ###

import sys
mod=10**9+7 ; inf=float("inf")
from math import sqrt, ceil
from collections import deque, Counter, defaultdict #すべてのkeyが用意されてる defaultdict(int)で初期化
input=lambda: sys.stdin.readline().strip()
sys.setrecursionlimit(11451419)
from decimal import ROUND_HALF_UP,Decimal  #変換後の末尾桁を0や0.01で指定
  #Decimal((str(0.5)).quantize(Decimal('0'), rounding=ROUND_HALF_UP))
from functools import lru_cache
from bisect import bisect_left as bileft, bisect_right as biright
#メモ化再帰defの冒頭に毎回 @lru_cache(maxsize=10**10)
#引数にlistはだめ
#######ここまでテンプレ#######
#ソート、"a"+"b"、再帰ならPython3の方がいい
#######ここから天ぷら########
n,m=map(int,input().split())
A=[int(input()) for i in range(m)]
NG=[0]*(10**5+10)
for i in A:
    NG[i]=1


@lru_cache(maxsize=10**10)
def qwe(x):
    if x==n:return 1
    if x>n:return 0
    if NG[x+1] and NG[x+2]: print(0);exit()
    if NG[x+1]:return qwe(x+2)%mod
    if NG[x+2]:return qwe(x+1)%mod
    return (qwe(x+2)+qwe(x+1))%mod
print(qwe(0))