Harryxun/stf_run huggingface dataset:
N = int(input())
x = list(input())[::-1]

num = 0
pop_num = 0
for i in range(N):
    if x[i] == "1":
        num += 2 ** i
        pop_num += 1

def popcnt(n):
    c = (n & 0x5555555555555555) + ((n>>1) & 0x5555555555555555)
    c = (c & 0x3333333333333333) + ((c>>2) & 0x3333333333333333)
    c = (c & 0x0f0f0f0f0f0f0f0f) + ((c>>4) & 0x0f0f0f0f0f0f0f0f)
    c = (c & 0x00ff00ff00ff00ff) + ((c>>8) & 0x00ff00ff00ff00ff)
    c = (c & 0x0000ffff0000ffff) + ((c>>16) & 0x0000ffff0000ffff)
    c = (c & 0x00000000ffffffff) + ((c>>32) & 0x00000000ffffffff)
    return c
x = x[::-1]
import sys
sys.setrecursionlimit(10**10)

def calc(i,depth,n):
    if depth == 0:
        if x[i] == "1":
            tmp = (num - 2 ** (N - i)) % (pop_num - 1)
            return calc(i,depth+1,tmp)
        else:
            tmp = (num + 2 ** (N - i)) % (pop_num + 1)
            return calc(i,depth+1,tmp)
    else:
        if n == 0: return depth
        return calc(i,depth+1, n % popcnt(n))
        

for i in range(N):
    print(calc(i,0,0))



### FIXED CODE ###

N = int(input())
x = list(input())[::-1]
num = 0
nump = 0
numm = 0
pop_num = 0
for i in range(N):
        if x[i] == "1":
            pop_num += 1
for i in range(N):
    if x[i] == "1":
        num += pow(2,i,pop_num)
        num %= pop_num 
        nump += pow(2,i,pop_num+1)
        nump %= pop_num  + 1
        if pop_num-1 != 0:
            numm += pow(2,i,pop_num - 1)
            numm %= pop_num - 1



def popcnt(n):
    c = (n & 0x5555555555555555) + ((n>>1) & 0x5555555555555555)
    c = (c & 0x3333333333333333) + ((c>>2) & 0x3333333333333333)
    c = (c & 0x0f0f0f0f0f0f0f0f) + ((c>>4) & 0x0f0f0f0f0f0f0f0f)
    c = (c & 0x00ff00ff00ff00ff) + ((c>>8) & 0x00ff00ff00ff00ff)
    c = (c & 0x0000ffff0000ffff) + ((c>>16) & 0x0000ffff0000ffff)
    c = (c & 0x00000000ffffffff) + ((c>>32) & 0x00000000ffffffff)
    return c

x = x[::-1]
def calc(i,depth,n):
    if depth == 0:
        if x[i] == "1":
            tmp = numm
            if pop_num - 1 != 0:
                tmp -= pow(2,N-i-1,pop_num-1)
                tmp %= (pop_num - 1)
            else:
                return 0
            return calc(i,depth+1,tmp)
        else:
            tmp = nump
            tmp += pow(2,N-i-1,pop_num+1)
            tmp %= (pop_num + 1)
            return calc(i,depth+1,tmp)
    else:
        if n == 0: return depth
        return calc(i,depth+1, n % popcnt(n))
        

for i in range(N):
    print(calc(i,0,0))
n = int(input())
an = list(map(int, input().split()))


from fractions import gcd
from functools import reduce

def lcm_base(x, y):
    return (x * y) // gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

lcma = lcm_list(an)
bn = []
for a in an:
    bn.append(lcma / a)

sumbn = int(int(sum(bn)) % 1000000007)

print(sumbn)

### FIXED CODE ###

n = int(input())
an = list(map(int, input().split()))

from fractions import gcd
from functools import reduce

def lcm_base(x, y):
    return (x * y) // gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

lcma = lcm_list(an)
ans = 0
for i in range(n):
    ans += (lcma//an[i])
mod=10**9+7
print(ans%mod)
import sys
sys.setrecursionlimit(1500)
n=int(input())
arr=list(map(int,input().split()))
vis={}
vis[1]=0
vis[2]=abs(arr[0]-arr[1])
def c(i):
  if i in vis:
    return vis[i]
  x = abs(arr[i-1]-arr[i-2]) + c(i-1)
  y = abs(arr[i-1]-arr[i-3]) + c(i-2)
  vis[i]=min(x, y)
  return vis[i]
c(n)
print(vis[n])

### FIXED CODE ###

n=int(input())
arr=list(map(int,input().split()))
if n < 2:
  print(0)
vis = [0] * n
vis[0] = 0
vis[1] = abs(arr[0]-arr[1])
for i in range(2, n):
    step_1 = abs(arr[i]-arr[i-1]) + vis[i-1]
    step_2 = abs(arr[i]-arr[i-2]) + vis[i-2]
    vis[i] = min(step_1, step_2)
print(vis[-1])
n=input()
l=list(map(int,input().split()))
x=0
c=list()
for i in range(1,len(l)+1):
  a=i+l[i-1]
  c.append(a)
  b=i-l[i-1]
  if b in c:
    x=x+c.count(b)
print(x)



### FIXED CODE ###

s=input()
if s== 'ABC':
  print('ARC')
if s=='ARC':
  print('ABC')
a,b=map(int,raw_input().split()) #???????¬?
print a*b,2*(a+b)
 

### FIXED CODE ###

a,b=map(int,raw_input().split()) #korenazo
print a*b , 2*(a+b)
fee = []
for i in range(4):
  fee.append(int(input()))
ans += mix(fee[0], fee[1])
ans += mix(fee[2], fee[3])
print(ans)

### FIXED CODE ###

fee = []
ans = 0
for i in range(4):
  fee.append(int(input()))
ans += min(fee[0], fee[1])
ans += min(fee[2], fee[3])
print(ans)
import sys
 
if __name__ == '__main__':
  args = sys.argv
  ret="No"
  
  if (args[1] == args[2] or args[2] == args[3] or args[1] == args[3]):
    ret="Yes"
    
  print(ret)


### FIXED CODE ###

import sys
 
if __name__ == '__main__':
  args = input().split()
  ret="No"
  if ((args[0] == args[1] or args[0] == args[2] or args[1] == args[2]) and (args[0] != args[1] or args[1] != args[2])):
    ret="Yes"
    
  print(ret)
def fact(n):
  ret=1
  for i in range(2.n+1):
    ret=ret*i
  return ret

n=int(input())
arr1=list(map(int,input().split()))
arr2=list(map(int,input().split()))
cnt1=0
cnt2=0
for i in range(n):
  cnt1+=(arr1[i]-1)*fact(n-i-1)
  cnt2+=(arr2[i]-1)*fact(n-i-1)
print(abs(cnt1-cnt2))

### FIXED CODE ###

import itertools
n=int(input())
p=tuple(map(int,input().split()))
q=tuple(map(int,input().split()))
arrs=list(itertools.permutations(range(1,n+1)))
cnt1=0
cnt2=0
for i in range(len(arrs)):
  if arrs[i]==p:
    cnt1=i
  if arrs[i]==q:
    cnt2=i
print(abs(cnt2-cnt1))
Q = int(input())
query = [list(map(int, input().split())) for _ in range(Q)]

def is_prime(n):
  if n <= 1:
    return False
  if n == 2:
    return True
  i = 2
  while i * i <= n:
    if n % i == 0:
      return False
    i += 1
  return True

prime = []
ans = [0]*10001
sum_a = [0]*10001
for n in range(1, 10000+1):
  if is_prime(n) and is_prime((n+1)//2):
    if n != 2:
      prime.append(n)
      ans[n] = 1
  sum_a[n] = sum_a[n-1] + ans[n]

for l, r in query:
  print(sum_a[r] - sum_a[l-1])

### FIXED CODE ###

Q = int(input())
query = [list(map(int, input().split())) for _ in range(Q)]

def is_prime(n):
  if n <= 1:
    return False
  if n == 2:
    return True
  i = 2
  while i * i <= n:
    if n % i == 0:
      return False
    i += 1
  return True

prime = []
ans = [0]*100001
sum_a = [0]*100001
for n in range(1, 100000+1):
  if is_prime(n) and is_prime((n+1)//2):
    if n != 2:
      prime.append(n)
      ans[n] = 1
  sum_a[n] = sum_a[n-1] + ans[n]

for l, r in query:
  print(sum_a[r] - sum_a[l-1])
a,b,c,d,e,k=[int(input()) for _ in range(5)]
if e-a>=k:
    print('Yay!')
else:
    print(':(')

### FIXED CODE ###

a,b,c,d,e,k=[int(input()) for _ in range(6)]
if e-a<=k:
    print('Yay!')
else:
    print(':(')
import math

class _const:
    def __init__(self):
        self.PI=math.acos(-1)
        self.convToDEG=180/self.PI
const=_const()


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

Volume=a*a*b

if 2*x>=Volume:
    print("..")
    print(const.convToDEG*math.atan(2*(a*a*b-x)/a**3))

else:
    h=2*x/(a*b)
    print(const.convToDEG*math.acos(h/b))



### FIXED CODE ###

import math

class _const:
    def __init__(self):
        self.PI=math.acos(-1)
        self.convToDEG=180/self.PI
const=_const()


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

Volume=a*a*b

if 2*x>=Volume:
    print(const.convToDEG*math.atan(2*(a*a*b-x)/a**3))

else:
    r=2*x/(a*b*b)

    print(const.convToDEG*(const.PI/2-math.atan(r)))
n,m = int(input().split(''))
arr = list(map(int,input().split('')))
res = 0
for i in arr:
  if i >= m:
    res += 1
return res

### FIXED CODE ###

n, k = map(int, input().split(' '))
hs = list(map(int, input().split(' ')))
print(len([h for h in hs if h >= k]))
import sys 
import numpy as np

N = int(sys.stdin.readline())
P = np.array([int(x) for x in sys.stdin.readline().split()])

SUM = np.sum([np.sum([min(P[l:r+1]) for r in range(l, N)]) for l in range(N)])

print(SUM)

### FIXED CODE ###

line = input()

ori = len(line)

count = 0 

T = 0 
S = 0 

for i in line:
    if i is "S":
        S += 1
    else:
        if S is not 0:
            S -= 1
            count += 1

print(ori - count * 2)
a,b = map(int,input().split())
for i in range(1,4) :
    if (a*b*c)%2 == 1 :
        print('Yes')
    else :
        print('No')

### FIXED CODE ###

a,b = map(int,input().split())
if (a*b)%2 == 1 :
    print('Yes')
else :
    print('No')
a=input()
if a=='SUN':
  print(7)
elif a=='MON':
  print(6)
elif a=='TUE':
  print(5)
elif a=='WED':
  pirnt(4)
elif a=='THU':
  print(3)
elif a=='FRI':
  print(2)
else:
  print(1)


### FIXED CODE ###

c=0
a=input()
if a=='SUN':
  c+=7
elif a=='MON':
  c+=6
elif a=='TUE':
  c+=5
elif a=='WED':
  c+=4
elif a=='THU':
  c+=3
elif a=='FRI':
  c+=2
else:
  c+=1
print(c)
import numpy as np
def main():
    ttt = []
    n = int(input())
    e = [[int(i) for i in input().split()] for i in range(int(input()))]
    #n = 3
    #e = [[21,-11],[81234,94124,52141]]
    for i in range(n):
        t = e[0][0] - e[1][i]*0.006
        tt = abs(e[0][1] - t)
        ttt.append(tt)
    ttt = np.array(ttt)
    print(np.argmin(ttt)+1)
main()

### FIXED CODE ###

import numpy as np
def main():
    ttt = []
    n = int(input())
    N, M = map(int, input().split())
    e = list(map(int, input().split()))
    #e = [[int(i) for i in input().split()] for i in range(int(input()))]
    #n = 3
    #e = [[21,-11],[81234,94124,52141
    for j in range(n):
        t = N - e[j]*0.006
        tt = abs(M - t)
        ttt.append(tt)
    ttt = np.array(ttt)
    print(np.argmin(ttt)+1)
main()
#!/usr/bin/env python3

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))


n = I()
a = LI()
c = list(Counter(a).items())

x = len(c)
H = []
for i,j in c:
    heappush(H,j)
for k in range(1,n+1):
    if k == 1:
        print(n)
        continue
    if k > x:
        print(0)
        continue
    h = H.copy()
    ans = 0
    while len(h) >= k:
        ans += 1
        tmp = heappop(h)
        lst = []
        for _ in range(k-1):
            s = heappop(h)
            s -= tmp
            if s == 0:
                continue
            lst.append(s)
        for i in lst:
            heappush(h,i)
    print(ans)

### FIXED CODE ###

#!/usr/bin/env python3

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
"""
.2分探索を考える
.各kに対してx回以上抜き出せるかという問いを考える
.各数の個数を数えて数iの個数をCiとする
.各数iを抜き出せるのはCiまで
 ⇒各数を抜き出す回数min(Ci,x)
.Σmin(Ci,x)はkx以上でなければいけない(k個x回抜き出すため)
.これを満たすときx回抜き出せる
.このままではO(n^2(logn))なので工夫する
.Σ(min(Ci,x))はk依存でないのでここを工夫する(Σ(min(Ci,x))をSxとする)
.SxはSx-1と比べてx以上のCiの数だけ増える(x以上のCiの数をDxとする)
.Sx := Sx-1 + Dx
.Dxを求める時はCのリストについてbisectを行う。
.Sx >= k*xとなるxの最大値を2分探索で求める。(O(nlogn))
"""
n = I()
a = LI()
cnt = list(Counter(a).values())
cnt.sort()
m = len(cnt)
S = [0]*(n+1)
for x in range(1,n+1):
    l = bl(cnt,x)
    S[x] = S[x-1] + (m-l)
for k in range(1,n+1):
    high,low = n+1,0
    while high - low > 1:
        mid = (high + low)//2
        if S[mid] >= k*mid:
            low = mid
        else:
            high = mid
    print(low)
N, M = map(int,input().split())
A = list(map(int,input().split()))
if N < sum(A): print(-1)
else: print(N - sum(A))


### FIXED CODE ###

from math import pi
print(2 * int(input()) * pi)
from itertools import combinations
n=int(input())
xs = []
for _ in range(n):
    x,y=map(int,input().split())
    xs.append((x,y))

def func(c):
    p,q=(xs[c[0]][0]-xs[c[1]][0],xs[c[0]][1]-xs[c[1]][1])
    ys=[(x,y) for x,y in xs if (x-p,y-q) not in xs]
    return len(ys)

c = combinations(range(n),2)
print(min(map(func, c)))

### FIXED CODE ###

from itertools import combinations
n=int(input())
if n == 1:
    print(1)
else:
    xs = []
    for _ in range(n):
        x,y=map(int,input().split())
        xs.append((x,y))
    
    def func(c):
        p,q=(xs[c[0]][0]-xs[c[1]][0],xs[c[0]][1]-xs[c[1]][1])
        ys=[(x,y) for x,y in xs if (x-p,y-q) not in xs]
        return len(ys)
    
    c = combinations(range(n),2)
    print(min(map(func, c)))
def sum_axis(input_list):
    x_sum, y_sum, z_sum = 0, 0, 0
    for i in input_list:
        x_sum += i[0]
        y_sum += i[1]
        z_sum += i[2]

    return x_sum, y_sum, z_sum

N, M = map(int, input().split(' '))

if M == 0:
    print(0)
    exit()

xyz = []
for i in range(N):
    xyz.append(list(map(int, input().split(' '))))

signs = [[1, 1, 1], [1, 1, -1], [1, -1, 1], [1, -1, -1],
        [-1, 1, 1], [-1, 1, -1], [-1, -1, 1], [-1, -1, -1]]
results = []

for sign in signs:
    sorted_list = sorted(xyz, key = lambda x: sign[0] * x[0] + sign[1] * x[1] + sign[2] * x[2])

    tmp = sum_axis(sorted_list[-M:])
    results.append(tmp[0] * sign[0] + tmp[1] * sign[1] + tmp[2] * sign[2])

print(max(results))

### FIXED CODE ###

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

if A > 8:
    print(":(");
    exit()
if B > 8:
    print(":(");
    exit()
print("Yay!")
h = int(input())
def waruni(i):
  if i == 2 or i == 3:
    return 3
  else:        
    r = waruni(i//2) * 2 + 1
    return r
rus = waruni(h)
print(rus)
# I love kemofure

### FIXED CODE ###

h = int(input())
if h == 0:
  print(0)
  quit()
i = 0
while True:
  if h < 2**i:
    print(2**i - 1)
    quit()
  else:
    i += 1
# I love kemofure
import sys,queue,math,copy,itertools,bisect,collections,heapq

def check(x0,y0,p,r):
    for x,y in p:
        if (x-x0)**2 + (y-y0)**2 > r*r:
            return False
    return True


def main():
    eps = 10 ** (-9)
    LI = lambda : [int(x) for x in sys.stdin.readline().split()]
    NI = lambda : int(sys.stdin.readline())
    dist = lambda x1,y1,x2,y2: math.sqrt((x1-x2)**2 + (y1-y2)**2)
    N = NI()
    p = [LI() for _ in range(N)]

    high = 1000
    low = 0

    while high > low + 10 ** (-8):
        mid = (high + low) / 2

        for (x1,y1),(x2,y2) in itertools.combinations(p,2):
            r = dist(x1,y1,x2,y2) / 2
            if r > mid + eps:
                low = mid
                break

            x0 = (x1+x2) / 2
            y0 = (y1+y2) / 2
            h = math.sqrt(mid**2 - r**2)
            if y1 == y2:
                dx = 0
                dy = h / 2
                yi2 = y0 - h / 2
            else:
                d = -(x1-x2) / (y1-y2)
                v = math.sqrt(1+d*d)
                dx = h / 2 / v
                dy = h / 2 / v * d
            if check(x0 + dx,y0 + dy,p,mid) or check(x0 - dx,y0 - dy,p,mid):
                high = mid
                break
        else:
            low = mid

    print(low)


if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys,queue,math,copy,itertools,bisect,collections,heapq

def check(x0,y0,p,r):
    for x,y in p:
        if (x-x0)**2 + (y-y0)**2 > r*r + 10 ** (-9):
            return False
    return True


def main():
    eps = 10 ** (-10)
    LI = lambda : [int(x) for x in sys.stdin.readline().split()]
    NI = lambda : int(sys.stdin.readline())
    dist = lambda x1,y1,x2,y2: math.sqrt((x1-x2)**2 + (y1-y2)**2)
    N = NI()
    p = [LI() for _ in range(N)]

    high = 1000
    low = 0

    while high > low + 10 ** (-8):
        mid = (high + low) / 2

        for (x1,y1),(x2,y2) in itertools.combinations(p,2):
            r = dist(x1,y1,x2,y2) / 2
            if r > mid :
                low = mid
                break

            x0 = (x1+x2) / 2
            y0 = (y1+y2) / 2
            h = math.sqrt(mid**2 - r**2)
            if y1 == y2:
                dx = 0
                dy = h
            else:
                d = -(x1-x2) / (y1-y2)
                v = math.sqrt(1+d*d)
                dx = h / v
                dy = h / v * d
            if check(x0+dx,y0+dy,p,mid) or check(x0-dx,y0-dy,p,mid):
                high = mid
                break
        else:
            low = mid

    print(low)


if __name__ == '__main__':
    main()
from sys import exit
n = int(input())
a = list(map(int, input().split()))
if n==1: print(0); exit()
al = [0 for _ in range(n)]
for index in range(n-1):
	person = a[index]
	person_behind = a[index+1]
	if person_behind < person:
		k = person - person_behind
		a[index+1] += k
		al[person_behind] = k
print(sum(al))

### FIXED CODE ###

from sys import exit
n = int(input())
a = list(map(int, input().split()))
if n==1: print(0); exit()
al = [0 for _ in range(n)]
for index in range(n-1):
	person = a[index]
	person_behind = a[index+1]
	if person_behind < person:
		k = person - person_behind
		a[index+1] += k
		al[index+1] = k
print(sum(al))
n = int(input())
a = map(int, input().strip().split())
for number in a:
    if number%2==0:
        if number%3==0 or number%5==0:
            flag = 1
            continue
        else:
            flag = 0
            print('DENIED')
            break
if flag == 1:
    print('APPROVED')

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
even = [i for i in a if i%2 ==0]
count = 0 
for i in even:
    if i%3 == 0 or i%5 ==0:
        count += 1
print('APPROVED' if count == len(even) else 'DENIED')
import numpy as np
A, B, C, D = map(int, input().split())
s = np.arange(A, B+1)

s = s[np.where(s%C != 0)]
s = s[np.where(s%D != 0)]

print(s.shape[0])

### FIXED CODE ###

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

def gcd(a, b):
    if (b==0):
        return a
    else:
        return gcd(b, a % b)

G = C * D // gcd(C, D)

ans_b = B - B//C - B//D + B//G
ans_a = A - 1 - (A-1)//C - (A-1)//D + (A-1)//G

print(ans_b - ans_a)
a  =  int(input())

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

b.sorted()

c = 1
d = 0
dd = 0

p = b[0]

for i in range(1,a):
	if p == b[i]:
		c += 1
	elif p != b[i]:
		p = b[i]
		c = 1
	if c == 2:
		d = dd
		dd = p
	elif c == 4:
		d = p
		dd = p

print(d*dd)


### FIXED CODE ###

a  =  int(input())

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

b.sort()

c = 1
d = 0
dd = 0

p = b[0]

for i in range(1,a):
	if p == b[i]:
		c += 1
	elif p != b[i]:
		p = b[i]
		c = 1
	if c == 2:
		d = dd
		dd = p
	elif c == 4:
		d = p
		dd = p

print(d*dd)
abk = [int(i) for i in input().split()]
a = abk[0]
b = abk[1]
k = abk[2]

anss = []
for i in range(1,min(a,b)+1):
  if a%i==0 and b%i==0:
    anss.append(i)
    
anns.sort(reverse=True)
print(anss[k-1])


### FIXED CODE ###

abk = [int(i) for i in input().split()]
a = abk[0]
b = abk[1]
k = abk[2]

anss = []
for i in range(1,min(a,b)+1):
  if a%i==0 and b%i==0:
    anss.append(i)
    
anss.sort(reverse=True)
print(anss[k-1])
N=int(input())
L=list(int(input()) for _ in range(N))
M=L[::-1]
for i in range(N-1):
    if M[i]+1<M[i+1]:
        print('No')
        break
    elif M[i]+1=M[i+1]:
        M[i+1]=M[i]
else:print('Yes')

### FIXED CODE ###

N=int(input())
L=list(map(int,input().split()))
M=L[::-1]
for i in range(N-1):
    if M[i]+1<M[i+1]:
        print('No')
        break
    elif M[i]+1==M[i+1]:
        M[i+1]=M[i]
else:print('Yes')
X = int(input())
if n==17:
  print('YES')
  
else:
  print('NO')

### FIXED CODE ###

S = input()
if S[2] == S[3] and S[4] == S[5]:
  print("Yes")
else:
  print("No")
x, y = map(int, input().split())
if x * y % 2 = 1:
  print('Odd')
elif
  print('Even')

### FIXED CODE ###

x, y = map(int, input().split())
if x * y % 2:
  print('Odd')
else:
  print('Even')
N=int(input())
L=[int(input()) for _ in range(5)]
print(5 if min(L)>=5 else 4 -((-N)//min(L))


### FIXED CODE ###

N=int(input())
L=[int(input()) for _ in range(5)]
print(5 if min(L)>=N else 4 -((-N)//min(L)))
import numpy as sym

def fib(n):
    x = sym.symbols('x',nonnegative=True,integer=True) #変数xの宣言(非負の整数)
    Fib=1/sym.sqrt(5)*(((1+sym.sqrt(5))/2)**(n-1)-((1-sym.sqrt(5))/2)**(n-1)) #一般項の式
    result=Fib.subs(x,n) #xにnを代入
    result=result.evalf() #式を浮動小数点数として評価
    return int(result)

n,m = map(int,input().split())
a =  [int(input()) for i in range(m)]
a.append(n+1)

time_f=[]

for i,v in enumerate(a):
    if i == 0:
        # print (fib(a[i]))
        time_f = fib(a[i])
    else:
        # print((a[i]-a[i-1]-1))
        # print (fib(a[i]-a[i-1]-1))
        time_f *=fib(a[i]-a[i-1]-1)


print(time_f%1000000007)

### FIXED CODE ###

a = list(map(int,input().split()))
a.sort()
print(a[0]+a[1])
N = int(input())
AB = [list(map(int, input().split())) for _ in range(N - 1)]
# N = 9
# AB = [[1, 2], [2, 3], [9, 8], [8, 3], [3, 4], [4, 5], [3, 6], [6, 7]]
if N == 2:
    print(1, 2)
if N == 3:
    print(1, 2, 3)

x1 = set()
x2 = set()
x3 = set()

for i in range(1, N + 1):
    if i % 3 == 1:
        x1.add(i)
    elif i % 3 == 2:
        x2.add(i)
    else:
        x3.add(i)
x = [x1, x2, x3]

result = {}


class Node:
    def __init__(self, v):
        self.linked = set()
        self.v = v

    def add_node(self, node):
        self.linked.add(node)

    def set_rank(self, parent, rank):
        self.rank = rank
        if parent == None:
            result[self.v] = x1.pop()
        else:
            if x[(result[self.parent.v] + 1) % 3]:
                result[self.v] = x[(result[self.parent.v] + 1) % 3].pop()
            elif x1:
                x1.pop()
            elif x2:
                x2.pop()
            else:
                x3.pop()
        for node in self.linked:
            if node == parent:
                continue
            node.set_rank(parent=self, rank=rank + 1)

    def __repr__(self):
        return '{}'.format(self.rank)


nodes = {v: Node(v) for v in range(1, N + 1)}
for a, b in AB:
    nodes[a].add_node(nodes[b])
    nodes[b].add_node(nodes[a])

# usokaihou
root = nodes[1]
root.set_rank(None, 0)
print(' '.join(str(result[i]) for i in range(1, N + 1)))

exit()


### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000000)
N = int(input())
AB = [list(map(int, input().split())) for _ in range(N - 1)]


class Tree:
    def __init__(self, v):
        self.v = v
        self.neighbors = []

    def set_rank(self, rank, parent):
        self.rank = rank
        for neighbor in self.neighbors:
            if neighbor is parent:
                continue
            neighbor.set_rank(rank=rank + 1, parent=self)


trees = {i: Tree(i) for i in range(1, N + 1)}

for a, b in AB:
    trees[a].neighbors.append(trees[b])
    trees[b].neighbors.append(trees[a])
try:
    trees[1].set_rank(1, None)
except:
    print(-1)
    exit()

group0 = [node.v for node in trees.values() if node.rank % 2 == 0]
group1 = [node.v for node in trees.values() if node.rank % 2]
x = [set(), set(), set()]
for i in range(1, N + 1):
    x[i % 3].add(i)
if len(group1) < len(group0):
    group1, group0 = group0, group1
result = {}
if len(group0) <= len(x[0]):
    while group0 and x[0]:
        result[group0.pop()] = x[0].pop()
    y = x[0] | x[1] | x[2]
    while group1 and y:
        result[group1.pop()] = y.pop()
else:
    while x[2] and group0:
        result[group0.pop()] = x[2].pop()
    while x[1] and group1:
        result[group1.pop()] = x[1].pop()
    while group0 and x[0]:
        result[group0.pop()] = x[0].pop()
    while group1 and x[0]:
        result[group1.pop()] = x[0].pop()
    if group0 or group1:
        print(-1)
        exit()

print(' '.join(str(result[i]) for i in range(1, N + 1)))
a,b,c = map(int,input().split())

if a==b and b!=c:
  print("Yes")
elif c==b! and c==a:
  print("Yes")
elif a!=b and b==c:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

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

if a==b and b==c:
  print("No")
elif a==b or b==c or c==a :
  print("Yes")
  
else:
  print("No")