Harryxun/stf_run huggingface dataset:
N, K = map(int, input().split())
S = input()

bl = []
if S[0] == "0":
    bl.append(0)
bl.append(0)
for i in range(1, N):
    if S[i-1] != S[i]:
        bl.append(i)
bl.append(N)
bl.append(N)

nbl = len(bl)
m = [bl[i+2 * K+1] - bl[i] 
     for i in range(nbl - 2*K-1) if i%2 == 0]
if len(m) == 0:
    print(N)
else:
    print(max(m))

### FIXED CODE ###

A, B = map(int, input().split())

sum_coin = 0
tmp = max(A, B)
sum_coin += tmp
if tmp == A:
    A += -1
else:
    B += -1
tmp = max(A, B)
sum_coin += tmp
print(sum_coin)
a,p=mp()
print((a*3+p)//2)

### FIXED CODE ###

import sys
from collections import Counter
from collections import deque
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

a,p=mp()
print((a*3+p)//2)
n, m = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a)
a.sort(reversed = True)
k = s/(4*m)
if a[m-1] < k:
  print("No")
else:
  print("Yes")

### FIXED CODE ###

n, m = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a)
a.sort(reverse = True)
k = s/(4*m)
if a[m-1] < k:
  print("No")
else:
  print("Yes")
import math
a,b=map(str,input().split())
print(int(int(a)*b))

### FIXED CODE ###

import math
import decimal
a,b=map(str,input().split())
print(math.trunc(decimal.Decimal(a)*decimal.Decimal(b)))
N, M = map(int, raw_input().split())
a = []
for i in range(M):
    a.append(map(int, raw_input().split()))
    print len(N + M)


### FIXED CODE ###

import sys
for e in sys.stdin.readlines():
 print(len(str(sum(map(int,e.split())))))
N=input()
a=list(map(int, input().split()))
b=a
c=1
if c<=N:
	d=a[c-1]
    b[d-1]=c
    c+=1
' '.join(b)

### FIXED CODE ###

N=int(input())
a=list(map(int,input().split()))
ans=[0]*N
for i in range(N):
	b=a[i]-1
	ans[b]=i+1
for i in range(N):
	print(ans[i])
A, B = map(int, input().slit())
 
A_price = (A / 8) * 100
 
B_price = (B / 10) * 100
 
if int(A_price) == int(B_price):
	print(int(A_price))
else:
	X = (int(A_price) / 100) * 10
    Y = (int(B_price) / 100) * 8
    if B == int(X):
    	print(int(A_price))
    elif A == int(Y):
    	print(int(B_price))
    else:
    	print(-1)


### FIXED CODE ###

A,B = map(int, input().split())
num = 0
while num < 1011:
  num += 1
  X = num * 0.08
  if int(X) == A:
    Y = num * 0.1
    if int(Y) == B:
      print(num)
      break
    else:
      pass
  elif num == 1010:
    print(-1)
    break
  else:
    pass
S = ["" for i in range(3)]
abc = "ABC"
for i in range(3):
    S[i] = input()
    


turn = 0
zero_card = False
while True:
    if len(S[turn]) == 1 and zero_card:
        print(abc[turn])
        break
    else:
        if len(S[turn]) == 1:
            zero_card = True
        next_turn = 0
        if S[turn][0] == "a":
            next_turn = 0
        elif S[turn][0] == "b":
            next_turn = 1
        else:
            next_turn = 2
        S[turn] = S[turn][1:]
        turn = next_turn

### FIXED CODE ###

S = ["" for i in range(3)]
abc = "ABC"
for i in range(3):
    S[i] = input()
    


turn = 0
zero_card = False
while True:
    if len(S[turn]) == 0:
        print(abc[turn])
        break
    else:
        next_turn = 0
        if S[turn][0] == "a":
            next_turn = 0
        elif S[turn][0] == "b":
            next_turn = 1
        else:
            next_turn = 2
        S[turn] = S[turn][1:]
        turn = next_turn
def examD():
    N, M = LI()
    D = [[float("inf") for i in range(N)] for i in range(N)]
    # d[u][v] : 辺uvのコスト(存在しないときはinf)
    XY = [[0,0]]*M
    for i in range(M):
        x, y, z = map(int, input().split())
        XY[i] = [x-1,y-1]
        D[x - 1][y - 1] = z
        D[y - 1][x - 1] = z
    for i in range(N):
        D[i][i] = 0  # 自身のところに行くコストは０
    d = copy.deepcopy(D)
#    print(warshall_floyd(N, d))
    W = warshall_floyd(N, d)
    cur = int(0)
    for i in range(M):
        if D[XY[i][0]][XY[i][1]]>W[XY[i][0]][XY[i][1]]:
            cur += 1
    print(cur)

import sys
import copy
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examD()


### FIXED CODE ###

def warshall_floyd(n,d):
    #d[i][j]: iからjへの最短距離
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j] = min(d[i][j],d[i][k] + d[k][j])
    return d

def examD():
    N, M = LI()
    D = [[float("inf") for i in range(N)] for i in range(N)]
    # d[u][v] : 辺uvのコスト(存在しないときはinf)
    XY = [[0,0]]*M
    for i in range(M):
        x, y, z = map(int, input().split())
        XY[i] = [x-1,y-1]
        D[x - 1][y - 1] = z
        D[y - 1][x - 1] = z
    for i in range(N):
        D[i][i] = 0  # 自身のところに行くコストは０
    d = copy.deepcopy(D)
#    print(warshall_floyd(N, d))
    W = warshall_floyd(N, d)
    cur = int(0)
    for i in range(M):
        if D[XY[i][0]][XY[i][1]]>W[XY[i][0]][XY[i][1]]:
            cur += 1
    print(cur)

import sys
import copy
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examD()
n, m = map(int, input().split())

L = 1
R = 10**5

for i in range(m):
    l, r = map(int, input().split())
    if L <= l <= R:
        L = l
    if L <= r <= R:
        R = r
    if R < l or r < L:
        ans = 0
        break

if ans != 0:
    ans = R - L + 1

print(ans)

### FIXED CODE ###

n, m = map(int, input().split())

L = 1
R = 10**5
ans = 1

for i in range(m):
    l, r = map(int, input().split())
    if L <= l <= R:
        L = l
    if L <= r <= R:
        R = r
    if R < l or r < L:
        ans = 0
        break

if ans != 0:
    ans = R - L + 1

print(ans)
if 3200 <= a:
    print(input(s))
if a < 3200:
    print("red")

### FIXED CODE ###

a = int(input())
s = input()

if 3200 <= a:
    print(s)
if a < 3200:
    print("red")
str_num = input()
input_str = input()
input_array = list(input_str)

match_num = 0
int_str_num =int(str_num)

if int_str_num % 2 == 0:
  half_str_num = int_str_num/2
  int_half_str_num = int(half_str_num)
  for i in range(int_half_str_num):
    if input_array[i] == input_array[i+int_half_str_num]:
      match_num = match_num + 1
    
  if n == half_str_num:
    print('Yes')
  else:
    print('No')
else:
  print('No')
  



### FIXED CODE ###

str_num = input()
input_str = input()
input_array = list(input_str)

n = 0
int_str_num =int(str_num)

if int_str_num % 2 == 0:
    half_str_num = int_str_num/2
    int_half_str_num = int(half_str_num)
    for i in range(int_half_str_num):
        if input_array[i] == input_array[i+int_half_str_num]:
            n = n + 1
    if n == half_str_num:
        print('Yes')
    else:
        print('No')
else:
  print('No')
def fib_memo(n):
    """メモ化フィボナッチ"""
    memo = [0]*(n+1)

    def _fib(n):
        if n <= 1:
            return n
        if memo[n] != 0:
            return memo[n]
        memo[n] = _fib(n-1) + _fib(n-2)
        return memo[n]

    return _fib(n)
  
N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]
B = [0]*(M-1)
for i in range(M):
  diff = 0
  if i == 0:
    diff = A[i] - 1
    B[0] = fib_memo(diff + 1)
  else if i == (M - 1):
    diff = N - A[M-1] -1
    B[M-1] = fib_memo(diff + 1)
  else:
    diff = A[i] - A[i-1]
    B[i] = fib_memo(diff + 1)
Ans = reduce(lambda a, b: a*b, B)
print(Ans % 1000000007)
    


### FIXED CODE ###

N, M = map(int, input().split())
A = [True] * (N+1)
for _ in range(M):
  idx = int(input())
  A[idx] = False

step = [0] * (N+1)
step[0] = 1
for i in range(1, N+1):
  if A[i]:
    step[i] = step[i-1] + step[i-2]
  else:
    step[i] = 0
print(step[N]%(10**9+7))
def main():
    from collections import defaultdict

    inf = 100 * 40 + 1

    N, Ma, Mb = map(int, input().split())

    dp = [inf] * (400 * N * 2 + 10)
    # dp[x]:=minimum price

    # (b-a)(Mb+Ma)-(b+a)(Mb-Ma)=0を目指す
    for _ in range(N):
        a, b, p = map(int, input().split())
        x = (b - a) * (Mb + Ma) - (b + a) * (Mb - Ma)
        for key in range(400 * N * 2 + 10):
            if dp[key] == inf: continue
            nkey = key + x
            dp[nkey] = min(dp[nkey], dp[key] + p)
        dp[x] = min(dp[x], p)

    if dp[0] == inf:
        print(-1)
    else:
        print(dp[0])


if __name__ == '__main__':
    main()

# import sys
#
# sys.setrecursionlimit(10 ** 7)
#
# input = sys.stdin.readline
# rstrip()
# int(input())
# map(int, input().split())


### FIXED CODE ###

N, Ma, Mb = map(int, input().split())
e = [tuple(map(int, input().split())) for _ in range(N)]

N_max = 40
a_max = 10
b_max = 10
c_max = 100

inf = N_max * c_max + 1
dp = [[[inf for _ in range(N_max * b_max + 1)] for _ in range(N_max * a_max + 1)] for _ in range(N_max + 1)]
dp[0][0][0] = 0

# print(dp[N])

for i, (aa, bb, cc) in enumerate(e, 1):
    for a in range(a_max * i + 1):
        for b in range(b_max * i + 1):
            dp[i][a][b] = min(dp[i][a][b], dp[i - 1][a][b])
            if a + aa < N_max * a_max + 1 and b + bb < N_max * b_max + 1:
                dp[i][a + aa][b + bb] = min(dp[i][a + aa][b + bb], dp[i - 1][a][b] + cc)

# print(dp[N])

ans = inf
for a in range(N_max * a_max + 1):
    for b in range(N_max * b_max + 1):
        # a:b=Ma:Mb
        # b*Ma=a*Mb
        if b * Ma == a * Mb and a * b > 0:
            ans = min(ans, dp[N][a][b])

print(ans if ans < inf else -1)
r, g, b = map(int, input().split())
s = (100*r) + (10*g) + b
if s%4 == 0:
  print(YES)
else:
  print(NO)

### FIXED CODE ###

r, g, b = map(int, input().split())
s = 100*r + 10*g + b
if s%4 == 0:
  print("YES")
else:
  print("NO")
a=input().split()
sum=0
for i in range(len(a)):
  a[i]=(int)(a[i])
for i in a:
  sum+=i
ans=0
ans+=(sum**2)
for i in a:
  ans-=i*i
return ans%(10**9+7)

### FIXED CODE ###

n=input()
a=input().split()
sum=0
for i in range(len(a)):
  a[i]=(int)(a[i])
for i in a:
  sum+=i
ans=0
ans+=(sum**2)
for i in a:
  ans-=i*i
print((ans//2)%(10**9+7))
n,m,k = map(int,input().split())

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

if k < a[0] and k < b[0]:
    print(0)
    exit()

if sum(a) + sum(b) <= k:
    print(n+m)
    exit()

a_temp = a[0]
b_temp = b[0]
temp = 0
count = 0
hour = 0
i = 0
j = 0

while k > hour:
    
    count += 1
    if a_temp <= b_temp:
        hour += a_temp
        i += 1
        if i == len(a):
            a_temp = 10**10
        else:
            a_temp = a[i]
    else:
        hour += b_temp
        j += 1
        if j == len(b):
            b_temp = 10**10
        else:
            b_temp = b[i]

print(count)


### FIXED CODE ###

n,m,k = map(int,input().split())

A = [int(x) for x in input().split()]
B = [int(x) for x in input().split()]

a, b = [0], [0]
for i in range(n):
     a.append(a[i] + A[i])
for i in range(m):
     b.append(b[i] + B[i])

ans, j = 0, m
for i in range(n + 1):
    if a[i] > k:
        break
    while b[j] > k - a[i]:
        j -= 1
    ans = max(ans, i + j)

print(ans)
import math
import sys
sys.setrecursionlimit(100000) 
N, X = map(int, input().split())
city = [X] + list(map(int, input().split()))
city_diff = [abs(city[i + 1] - city[i]) for i in range(N)]
ans = city_diff[0]
for i in range(1, N, 1):
    ans = math.gcd(ans, city_diff[i])
print(ans)

### FIXED CODE ###

def gcd(x, y):
    if y > x:
        return gcd(y, x)
    elif x == 0:
        return 0
    else:
        z = x % y
        if z == 0:
            return y
        else:
            return gcd(y, z)

N, X = map(int, input().split())
city = [X] + list(map(int, input().split()))
city_diff = [abs(city[i + 1] - city[i]) for i in range(N)]
ans = city_diff[0]
for i in range(1, N, 1):
    ans = gcd(ans, city_diff[i])
print(ans)
MOD=10**9+7
n,k=map(int,input().split())
a=list(map(int,input().split()))

if n==k:
  ans=1
  for i in range(k):ans=ans*a[i]%MOD
  print(ans)
  exit()

p=[]
m=[]
for q in a:
  if q>=0:p+=q,
  else:m+=q,

if p==[] and k%2==1:
  m.sort(reverse=True)
  ans=1
  for i in range(k):ans=ans*m[i]%MOD
  print(ans)
  exit()

a.sort(key=lambda x:abs(x),reverse=True)

s=[]
flg=1
for i in range(k):
  s.append(a[i])
  if a[i]<0:
    flg*=-1
if flg==-1:
  tmp=s.pop()
  if -tmp in s:
    s.append(a[k])
    break
  for i in range(k,n):
    if a[i]*tmp<=0:
      s.append(a[i])
      break
ans=1
for i in s:
  ans=ans*i%MOD
print(ans)

### FIXED CODE ###

import sys

# after これ通る？コピペs


def solve(n, k, aaa):
    MOD = 10 ** 9 + 7

    if n == k:
        ans = 1
        for a in aaa:
            ans = ans * a % MOD
        return ans

    pos = []  # Strictly, Non-neg
    neg = []
    for a in aaa:
        if a >= 0:
            pos.append(a)
        elif a < 0:
            neg.append(a)

    if len(pos) == 0:
        if k % 2 == 1:
            neg.sort(reverse=True)
        else:
            neg.sort()
        ans = 1
        for a in neg[:k]:
            ans = ans * a % MOD
        return ans

    pos.sort()
    neg.sort(reverse=True)
    ans = 1
    r = k

    if r % 2 == 1:
        ans = ans * pos.pop() % MOD
        r -= 1

    while r > 0:
        if len(pos) <= 1:
            ans = ans * neg.pop() * neg.pop() % MOD
        elif len(neg) <= 1:
            ans = ans * pos.pop() * pos.pop() % MOD
        else:
            pm = pos[-1] * pos[-2]
            nm = neg[-1] * neg[-2]
            if pm > nm:
                ans = ans * pos.pop() * pos.pop() % MOD
            else:
                ans = ans * neg.pop() * neg.pop() % MOD
        r -= 2

    return ans


n, k, *aaa = map(int, sys.stdin.buffer.read().split())
print(solve(n, k, aaa))
import math


def solve_even(n):
    assert(n % 2 == 0)
    k = n // 2
    return leg(k)


def leg(k):
    return sum(k // 5 ** i for i in range(1, int(math.log(k) / math.log(5)) + 1))


n = int(input())

if n % 2 == 0:
    print(solve_even(n))
else:
    if n == 1:
        print(0)
    else:
        print(solve_even(n + 1) - leg(n // 2))

# (2k + 1)!! = (2k + 2)! / (2^(k+1)*(k+1)!)


### FIXED CODE ###

import math


def solve_even(n):
    assert(n % 2 == 0)
    k = n // 2
    return leg(k)


def leg(k):
    return sum(k // 5 ** i for i in range(1, int(math.log(k) / math.log(5)) + 1))


n = int(input())

if n % 2 == 0:
    if n == 0:
        print(0)
    else:
        print(solve_even(n))
else:
    if n == 1:
        print(0)
    else:
        print(solve_even(n + 1) - leg(n // 2 + 1))

# (2k + 1)!! = (2k + 2)! / (2^(k+1)*(k+1)!)
#4問目
import math
import collections
A, B = map(int, input().split())

count = 0
gcd = fractions.gcd(A,B)

def devisor(num):
    array = []
    for i in range(1, math.floor(math.sqrt(num)) + 1):
        if(num % i == 0):
            array.append(i)
            array.append(math.floor(num / i))
    return array

def prime(n):
    prime = []
    while n % 2 == 0:
        prime.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            prime.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        prime.append(n)
    return prime

print(len(collections.Counter(prime(gcd))) + 1)

### FIXED CODE ###

#4問目
import math
import fractions
import collections
A, B = map(int, input().split())

count = 0
gcd = fractions.gcd(A,B)

def devisor(num):
    array = []
    for i in range(1, math.floor(math.sqrt(num)) + 1):
        if(num % i == 0):
            array.append(i)
            array.append(math.floor(num / i))
    return array

def prime(n):
    prime = []
    while n % 2 == 0:
        prime.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            prime.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        prime.append(n)
    return prime

print(len(collections.Counter(prime(gcd))) + 1)
import numpy as np

def main():
    N = int(input())
    x = []
    for i in range(N):
        x.append(list(map(int, input().split())))
    X = np.array(x)
    j = 0
    for i in range(N-1):
        for k in range(i+1, N):
            j += np.linalg.norm(X[i] - X[k], ord=2)

    print(2*j/N) # 2(N-1)!/N!

if __name__ == "__main__":
    main()
    

### FIXED CODE ###

import numpy as np

def main():
    N = int(input())
    x = []
    for i in range(N):
        x.append(list(map(int, input().split())))
    X = np.array(x)
    j = 0
    for i in range(N-1):
        for k in range(i+1, N):
            j += np.linalg.norm(X[i] - X[k], ord=2)

    print(2*j/N) # 2(N-1)!/N!

if __name__ == "__main__":
    main()
N = int(input())
if N <105:
  print(0)
else:
  for i in range(105,N,2):
    temp=0
    for j in range(3,15,2):
        if i%j==0:
            temp+=1
    if temp==3:
        cnt+=1
print(cnt)

### FIXED CODE ###

N = int(input())
cnt=0
if N <105:
  cnt =0
else:
  if N%2==0:
    for i in range(105,N+1,2):
      temp=0
      for j in range(1,N+1,2):
        if i%j==0:
          temp+=1
      if temp==8:
        cnt+=1
  else:
    for i in range(105,N+1,2):
      temp=0
      for j in range(1,N+3,2):
        if i%j==0:
          temp+=1
      if temp==8:
        cnt+=1

print(cnt)
n=int(input())
a=list(map(int,input().split()))
a.sort()
a.reverse()
max1=0;max2=0
for i in range(n-1):
  if a[i]==a[i+1]:
    max1=a[i]
    a[i+1]=0
    count=i
    break
for j in range(count,n-1):
  if a[j]==a[j+1]:
    max2=a[j]
    break
print(max1*max2)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
a.sort()
a.reverse()
max1=0;max2=0
count=0
for i in range(n-3):
  if a[i]==a[i+1]:
    max1=a[i]
    a[i+1]=0
    count=i+1
    break
if count==0:
  print(0)
  exit()
for j in range(count,n-1):
  if a[j]==a[j+1]:
    max2=a[j]
    break
print(max1*max2)
N = int(input())
A = input() .split()
a = list(A)
if len(a) == N:
    b = int(max(a))
    s = int(min(a))
    print(b-s)
else:
    N, A, a, b, s = FUCK

### FIXED CODE ###

N = int(input())
if N%2 == 0:
    print(N)
else:
    print(N*2)
ss = input()
t = insput()

def search(ss,t):
    ans = []
    if len(ss) < len(t):
        return ans
    for i in range(len(ss) - len(t), -1, -1):
        ss_cut = ss[i:len(t)+i]
        flag = True
        for j in range(len(t)):
            if ss_cut[j] != '?' and ss_cut[j] != t[j]:
                flag = False
        if flag:
            ss_ans = ss.replace(ss[i:len(t)+i], t)
            while '?' in ss_ans:
                ss_ans = ss_ans.replace('?', 'a')
            ans.append(ss_ans)
    return ans

if len(search(ss, t)) == 0:
    print('UNRESTORABLE')
else:
    ans_list = sorted(search(ss, t))
    print(ans_list)
    s = ans_list[0]
    print(s)

### FIXED CODE ###

ss = input()
tt = input()
ans = ''
for i in range(len(ss)-len(tt)+1):
    flag = True
    for s,t in zip(ss[i:],tt):
        if s != '?' and s != t:
            flag = False
            break
    if flag:
        ans = ss[:i] + tt + ss[i+len(tt):]

if ans !='':
    print(ans.replace('?','a'))
else:
    print('UNRESTORABLE')
age, max_money = int(input().split())
if age>= 13:
  print(max_money)
elif age>=6 and age<=12:
  print(max_money//2)
elif age<=5:
  print("0")

### FIXED CODE ###

age, max_money = map(int, input().split())
if age>= 13:
  print(max_money)
elif age>=6 and age<=12:
  print(max_money//2)
elif age<=5:
  print("0")
n,m = list(map(int, input().split()))
cities = defaultdict(list)
cities = [ list(map(int, input().split())) for _ in range(m)]
sorted = sorted(
  cities,
  key = lambda x: (x[0], x[1])
)
hoge = 0
first_code = 0
fuga = 0
second_code = 0
for city in sorted:
  if(hoge < city[0]):
    hoge = city[0]
    first_code += 1
    fuga = 0
    seconde_code = 0
  if(fuga < city[1]):
    fuga = city[1]
    seconde_code += 1    
  print(format(first_code, '06'), format(second_code, '06'),sep="")

### FIXED CODE ###

from collections import defaultdict
import heapq
n_pref, m_city = list(map(int, input().split()))
record = defaultdict(list)
cities = []
for i in range(m_city):
  pref, year = list(map(int, input().split()))
  cities.append({"pref": pref, "year": year})
  heapq.heappush(record[pref], year)
res = defaultdict(dict)
for key ,value in record.items():
  for i in range(1, len(value) + 1):
    res[key][heapq.heappop(value)] = i
for city in cities:
  print(format(city["pref"], '06d'), format(res[city["pref"]][city["year"]], '06d'), sep="")
n,m = (int(i) for i in input().split())
x = [int(i) for i in input().split()]

if m == 1:
	print(0)
else:
	sorted_x = sorted(x)

	diff_x = [sorted_x[i+1] - sorted_x[i] for i in range(m-1)]

	for i in range(n-1):
		diff_x.remove(max(diff_x))

	print(sum(diff_x))

### FIXED CODE ###

n,m = (int(i) for i in input().split())
x = [int(i) for i in input().split()]

if n >= m:
	print(0)
else:
	sorted_x = sorted(x)
 
	diff_x = []
	diff = 0
	result = 0
 
	for i in range(m-1):
		diff = sorted_x[i+1] - sorted_x[i]
		result += diff
		diff_x.append(diff)

	sorted_diff = sorted(diff_x, reverse=True)[:n-1]
 
	for i in range(n-1):
		result -= sorted_diff[i]
	 
	print(result)
a, b = map(int,input().split())
ans = 6-a-b
print(ans)


### FIXED CODE ###

a = int(input())
b = int(input())
print(6-a-b)
import sys

sys.setrecursionlimit(10000)

N, M = map(int, input().split())
a = [int(input()) for _ in range(M)]
a.append(N+1)
sum_move = 1
fact = [-1] * (N+1)
fact[0] = 1


def factorial(num, fact):
    if fact[num] > 0:
        return fact[num]
    else:
        fact[num] = factorial(num-1, fact) * num
        return fact[num]


step_begin = 0
for i in range(M+1):
    tmp_sum = 0
    step_end = a[i] - 1
    step_num = step_end - step_begin
    for j in range(step_num//2 + 1):
        tmp_sum += factorial(step_num - j, fact) \
            // factorial(j, fact) // factorial(step_num - 2 * j, fact)
    if tmp_sum != 0:
        sum_move *= tmp_sum
    else:
        sum_move = 0
        break
    step_begin = a[i] + 1

print(sum_move % 1000000007)

### FIXED CODE ###

N, M = map(int, input().split())
oks = [True] * (N+1)
a = [int(input()) for _ in range(M)]
for i in a:
    oks[i] = False

dp = [0] * (N+1)
dp[0] = 1
for i in range(N+1):
    for j in range(i+1, min(i+2, N)+1):
        if oks[j]:
            dp[j] += dp[i]
            dp[j] %= int(1e9+7)


print(dp[N])