Harryxun/stf_run huggingface dataset:
N,M=map(int,input().split())
x=[0,2,5,5,4,5,6,3,7,6]
a=list(map(int,input().split()))
a.sort()
x=[ x[a[i]] for i in range(M) ]

p=[[-1 for j in range(M)] for i in range(N+10)]
p[0]=[0 for j in range(M)]

for i in range(N+1):
    for j in range(M):
        if p[i][0]>-1 and sum(p[i])+1>sum(p[i+x[j]]):
            p[i+x[j]]=[p[i][k] for k in range(M)]
            p[i+x[j]][j]+=1

        elif p[i][0]>-1 and sum(p[i])+1==sum(p[i+x[j]]):
            tmp=[p[i][k] for k in range(M)]
            tmp[j]+=1
            for k in range(M-1,-1,-1) and tmp!=p[i+x[j]]:
                if tmp[k] > p[i+x[j]][k] :
                    p[i+x[j]]=[tmp[k] for k in range(M)]
                    break


for i in range(M-1,-1,-1):
    for j in range(p[N][i]):
        print(a[i],end="")

### FIXED CODE ###

import sys

def chk(i,j):
    tmp=[p[i][k] for k in range(M)]
    tmp[j]=p[i][j]+1
    for k in range(M-1,-1,-1):
        if tmp[k] > p[i+x[j]][k] :
            p[i+x[j]]=[tmp[k] for k in range(M)]

N,M=map(int,input().split())
x=[0,2,5,5,4,5,6,3,7,6]
a=list(map(int,input().split()))
a.sort()
b=[]
for i in range(M):
    for j in range(M):
        if x[a[j]]==x[a[i]]: tmp=j
    b.append(a[tmp]) 

a=list(set(b))
a.sort()
M=len(a)
x=[ x[a[i]] for i in range(M) ]

p=[-100 for i in range(N+10)]
p[0]=0
for i in range(N):
    if p[i]>-1:
        for j in range(M):
            p[i+x[j]]=max(p[i+x[j]],p[i]+1)

ans=""
while N>0:
    for j in range(M-1,-1,-1):
        if p[N]==p[N-x[j]]+1:
            ans+=str(a[j])
            N-=x[j]
            break
print(ans)
A = int(input())
B = int(input())
C = int(input())
D = int(input())

ab = A*B
cd = C*D
 
if ab >= cd:
  print (ab)
else:
  print (cd)

### FIXED CODE ###

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

ab = a * b
cd = c * d

if ab == cd:
    print(int(ab))
elif ab > cd:
    print(int(ab))
else:
    print(int(cd))
#!/usr/bin/env python3
import sys
import math
sys.setrecursionlimit(10000)
INF = 1<<32


def solve(a: int, b: int, x: int):
    y = float(x)/float(a)
    ans = .0
    if (a**2 * b - x) == 0:
        ans = 90.0
    if y >= a*b/2:
        bd = 2.0*(a*b-y)/a
        ans = 90.0-math.degrees(math.atan(a/bd))
    else:
        ad = 2.0*y/b
        ans = 90.0-math.degrees(math.atan(ad/b))

    print(ans)

    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  # type: int
    b = int(next(tokens))  # type: int
    x = int(next(tokens))  # type: int
    solve(a, b, x)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
import math
sys.setrecursionlimit(10000)
INF = 1<<32


def solve(a: int, b: int, x: int):
    y = float(x)/float(a)
    ans = .0
    if (a**2 * b - x) == 0:
        ans = 0.0
    elif y >= a*b/2:
        bd = 2.0*(a*b-y)/a
        ans = 90.0-math.degrees(math.atan(a/bd))
    else:
        ad = 2.0*y/b
        ans = 90.0-math.degrees(math.atan(ad/b))

    print(ans)

    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  # type: int
    b = int(next(tokens))  # type: int
    x = int(next(tokens))  # type: int
    solve(a, b, x)

if __name__ == '__main__':
    main()
n = int(raw_input())
 maxv = -10**9
 minv = 10**9

 for j in range(0,n-1):
   nums = int(raw_input())
   diff = nums - minv
   maxv = max(maxv,diff)
   minv = min(minv,nums)
 print maxv

### FIXED CODE ###

n = int(raw_input())
minv = int(raw_input())
maxv = -1*10**9
  
for j in range(n-1):
  nums = int(raw_input())  
  diff = nums - minv
  if maxv < diff:
    maxv = diff
  if nums < minv:
    minv = nums
  
print maxv
import sys
input = sys.stdin.readline

n = int(input())
ab = [tuple(map(int, input().split())) for _ in range(n-1)]

edges = {}
for i in range(1,n+1):
    edges[i] = set()

for tmp in ab:
    a,b = tmp
    edges[a].add(b)
    edges[b].add(a)

group = [[],[]]
g_flag = 0
next = {1}
while(len(next) > 0):
    tmp = list(next)
    next = set()
    for i in tmp:
        group[g_flag].append(i)
        for j in edges[i]:
            next.add(j)
            edges[j].remove(i)
    g_flag = 1- g_flag

even_n = len(group[0])
odd_n = len(group[1])

ans = [0] * (n+1)
if(even_n > n//3)&(odd_n > n//3):
    g1 = group[0][ : (n+2)//3]
    g2 = group[1][ : (n+1)//3]
    g0 = group[0][(n+2)//3 :] + group[1][(n+1)//3 :]
elif(even_n <= n//3):
    g0 = group[0].extend(group[1][: n//3 - even_n])
    g1 = group[1][n//3 - even_n : (n//3 - even_n) + (n+2)//3]
    g2 = group[1][(n//3 - even_n) + (n+2)//3 :]
else:
    g0 = group[1].extend(group[0][: n//3 - odd_n])
    g1 = group[1][n//3 - odd_n : (n//3 - odd_n) + (n+2)//3]
    g2 = group[1][(n//3 - odd_n) + (n+2)//3 :]

print(group)
print(g0)
print(g1)
print(g2)

for i in range((n+2)//3):
    ans[g1[i]] = i*3 + 1
for i in range((n+1)//3):
    ans[g2[i]] = i*3 + 2
for i,val in enumerate(g0):
    ans[val] = (i+1) * 3

print(' '.join(map(str, ans[1:])))

### FIXED CODE ###

import sys
input = sys.stdin.readline

n = int(input())
ab = [tuple(map(int, input().split())) for _ in range(n-1)]

edges = {}
for i in range(1,n+1):
    edges[i] = set()

for tmp in ab:
    a,b = tmp
    edges[a].add(b)
    edges[b].add(a)

group = [[],[]]
g_flag = 0
next = {1}
while(len(next) > 0):
    tmp = list(next)
    next = set()
    for i in tmp:
        group[g_flag].append(i)
        for j in edges[i]:
            next.add(j)
            edges[j].remove(i)
    g_flag = 1- g_flag

even_n = len(group[0])
odd_n = len(group[1])

ans = [0] * (n+1)
if(even_n > n//3)&(odd_n > n//3):
    g1 = group[0][ : (n+2)//3]
    g2 = group[1][ : (n+1)//3]
    g0 = group[0][(n+2)//3 :] + group[1][(n+1)//3 :]
elif(even_n <= n//3):
    g0 = group[0]+ group[1][: n//3 - even_n]
    g1 = group[1][n//3 - even_n : (n//3 - even_n) + (n+2)//3]
    g2 = group[1][(n//3 - even_n) + (n+2)//3 :]
else:
    g0 = group[1] + group[0][: n//3 - odd_n]
    g1 = group[0][n//3 - odd_n : (n//3 - odd_n) + (n+2)//3]
    g2 = group[0][(n//3 - odd_n) + (n+2)//3 :]

# print(group)
# print(g0)
# print(g1)
# print(g2)

for i in range((n+2)//3):
    ans[g1[i]] = i*3 + 1
for i in range((n+1)//3):
    ans[g2[i]] = i*3 + 2
for i,val in enumerate(g0):
    ans[val] = (i+1) * 3

print(' '.join(map(str, ans[1:])))
a,b,c=map(int,input().split())
print(min(b+c,a+2*b+1))


### FIXED CODE ###

n=int(input())
A=[]
B=[]
ans=0
for i in range(n):
    a,b=map(int,input().split())
    A.append(a)
    B.append(b)
for i in range(n-1,-1,-1):
    if (A[i]+ans)%B[i]!=0:
        ans+=(B[i]-(A[i]+ans)%B[i])

print(ans)
x,y = map(int,input().split())
print(x*y//gcd(x,y))


### FIXED CODE ###

import fractions
x,y = map(int,input().split())
print(x*y//fractions.gcd(x,y))
def main():
    N, M = map(int, input().split())
    l = [[] for _ in range(N)]
    for _ in range(M):
        a, b = map(int, input().split())
        l[a-1].append(b-1)
    c = [0] * N
    loop = []
    def cyclic(n):
        if c[n] == 2:
            return False
        if c[n] == 1:
            loop.append(n)
            return True
        c[n] = 1
        for i in l[n]:
            if cyclic(i):
                loop.append(n)
                return True
        c[n] = 2
        return False
    for i in range(N):
        if cyclic(i):
            break
    if len(loop) == 0:
        print(-1)
        return
    print(0)
    return
main()


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
def main():
    N, M = map(int, input().split())
    l = [[] for _ in range(N)]
    for _ in range(M):
        a, b = map(int, input().split())
        l[a-1].append(b-1)
    c = [0] * N
    loop = []
    def cyclic(n):
        if c[n] == 2:
            return False
        if c[n] == 1:
            loop.append(n)
            return True
        c[n] = 1
        for i in l[n]:
            if cyclic(i):
                loop.append(n)
                return True
        c[n] = 2
        return False
    for i in range(N):
        if cyclic(i):
            break
    if len(loop) == 0:
        print(-1)
        return
    print(0)
    return
main()
N = int(input())
S = list(input().split())
 
ans = 1
for i in range(N - 1):
    if S[i] != S[i + 1]:
        ans = ans + 1
print(ans)

### FIXED CODE ###

N = int(input())
S = input()
 
ans = 1
for i in range(N - 1):
    if S[i] != S[i + 1]:
        ans = ans + 1
print(ans)
x=int(input())
a=x//999
b=x%999+1000
B=text(b)
C=B[1:]
if a==0:
  print("ABC"+C)
else:
  print("ABD"+C)


### FIXED CODE ###

x=int(input())
a=x//1000
if a==0:
  print("ABC")
else:
  print("ABD")
S=int(input())
if S[3]==S[4] and S[5]==S[6]:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

S=input()
if S[2]==S[3] and S[4]==S[5]:
    print('Yes')
else:
    print('No')
mod = 10**9+7


def inv(a, mod):
    r = [1, 0, a]
    w = [0, 1, mod]
    while w[2] != 1:
        q = r[2]//w[2]
        r_new = [r[0]-q*w[0], r[1]-q*w[1], r[2]-q*w[2]]
        r = w
        w = r_new
    x, y = w[0], w[1]    # a*x+y*mod = 1
    return (mod+x % mod) % mod


max_num = 2*10**5+1
fact = [0 for _ in range(max_num)]
ifact = [0 for _ in range(max_num)]

fact[0] = fact[1] = 1
ifact[0] = ifact[1] = 1

for i in range(2, max_num):
    fact[i] = fact[i-1] * i % mod
    ifact[i] = ifact[i-1] * inv(i, mod) % mod


def cmb(x, y):
    return fact[x] * ifact[y] * ifact[x-y] % mod


def solve(r, c):
    ans = 0
    for i in range(r+1):
        ans += cmb(c+i+1, c)
        ans %= mod
    return ans


r1, c1, r2, c2 = map(int, input().split())

ans = solve(r2, c2) - solve(r2, c1-1) - solve(r1-1, c2) + solve(r1-1, c1-1)
ans %= mod

print(ans)


### FIXED CODE ###

mod = 10**9+7


def inv(a, mod):
    r = [1, 0, a]
    w = [0, 1, mod]
    while w[2] != 1:
        q = r[2]//w[2]
        r_new = [r[0]-q*w[0], r[1]-q*w[1], r[2]-q*w[2]]
        r = w
        w = r_new
    x, y = w[0], w[1]    # a*x+y*mod = 1
    return (mod+x % mod) % mod


max_num = 2*10**6+100
fact = [0 for _ in range(max_num)]
ifact = [0 for _ in range(max_num)]

fact[0] = fact[1] = 1
ifact[0] = ifact[1] = 1

for i in range(2, max_num):
    fact[i] = fact[i-1] * i % mod
    ifact[i] = ifact[i-1] * inv(i, mod) % mod


def cmb(x, y):
    return fact[x] * ifact[y] * ifact[x-y] % mod


def solve(r, c):
    ans = 0
    for i in range(r+1):
        ans += cmb(c+i+1, c)
        ans %= mod
    return ans


r1, c1, r2, c2 = map(int, input().split())

ans = solve(r2, c2) - solve(r2, c1-1) - solve(r1-1, c2) + solve(r1-1, c1-1)
ans %= mod

print(ans)
while True :
    (x, y) = int(i) for i in input().split()
    if x = 0 and y = 0 :
        break
    elif x >= y :
        print(x,y)
    else :
        print(y,x)

### FIXED CODE ###

while True:
    (x, y) = [int(i) for i in input().split()]
    
    if x == y == 0 :
        break

    if x <= y :
        print(x, y)
    else :
        print(y, x)
import sys
x = sys.stdin.read()
print x**3

### FIXED CODE ###

import sys
x = sys.stdin.read()
print int(x)**3
a,b,q = map(int,input().split())
s = [-float('inf')]+[int(input()) for i in range(a)]+[float('inf')]
t = [-float('inf')]+[int(input()) for i in range(b)]+[float('inf')]
x = [int(input()) for i in range(q)]
import bisect
for x_ in x:
    s_r = bisect.bisect_right(s,x_)
    t_r = bisect.bisect_right(s,x_)
    res = float('inf')
    for S in [s[s_r-1],s[s_r]]:
        for T in [t[t_r-1],t[t_r]]:
            d1 = abs(S-x_)+abs(T-S)
            d2 = abs(T-x_)+abs(S-T)
            res = min(res,d1,d2)
    print(res)

### FIXED CODE ###

a,b,q = map(int,input().split())
s = [-float('inf')]+[int(input()) for i in range(a)]+[float('inf')]
t = [-float('inf')]+[int(input()) for i in range(b)]+[float('inf')]
x = [int(input()) for i in range(q)]
import bisect
for x_ in x:
    s_r = bisect.bisect_right(s,x_)
    t_r = bisect.bisect_right(t,x_)
    res = float('inf')
    for S in [s[s_r-1],s[s_r]]:
        for T in [t[t_r-1],t[t_r]]:
            d1 = abs(S-x_)+abs(T-S)
            d2 = abs(T-x_)+abs(S-T)
            res = min(res,d1,d2)
    print(res)
N,A,B = map(int,input().split())
    if (B-A)%2==0:
        print(str(int(B-(B+A)/2)))
    else:
        if B-A==1:
            if N-A>B-1:
                print(B-1)
            else:
                print(N-A)
        else:
            if N-A>B-1:
                print(A+(A-B)/2)
            else:
                print(B+(B-A)/2)

### FIXED CODE ###

N,A,B = map(int,input().split())
if (B-A)%2==0:
    print(str(int(B-(B+A)//2)))
else:
    if N-B>A-1:
        print(str(int(A+(B-A-1)//2)))
    else:
        print(str(int(N-B+1+(B-A-1)//2)))
a,b=map(int,input().split())
if (a*b)%2==0:
  print(Odd)
else:
  print(Even)
  

### FIXED CODE ###

a,b=map(int,input().split())
if (a*b)%2==0:
  print("Even")
else:
  print("Odd")
#https://agc023.contest.atcoder.jp/submissions/2429958
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
 
sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7
 
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
  
def main():
    n,x = LI()
    m = [I() for _ in range(n)]
    r = (x - m[0] - m[1] - m[2]) // (min(m))

    return r
 
print(main())

### FIXED CODE ###

n,x = (int(i) for i in input().split()) 
m = [int(input()) for i in range(n)] 
count_donut = 0 
for m_i in m:
    x = x - m_i
    count_donut +=1
count_donut += x // min(m)
print(count_donut)
"""
#include <stdio.h>
int main(){
  int l, r, ans=99999;
  int lst[99999];
  scanf("%d",&l);
  scanf("%d",&r);
  l %= 2019;
  r %= 2019;
  for(int i=l;i<r;i++){
    for(int j=i+1;j<r+1;j++){
      if(ans>(i*j)%2019){
        ans = (i*j)%2019;
        //printf("%d\n",ans);
      }
    }
  }
  printf("%d\n",ans);

}
/*"""
l, r = map(int, input().split())
l = l3
l2 = 2019*(l//2019)
r -= l2
l %= 2019

if r>= 2019:
  print(0)
else:
  print(l3*(l3+1))

#for i in range()

#lst = []
sum = 9999999999
#lm = 99999999999
#rm = 99999999999
#for 
#print(l%2019)
"""
for i in range(l,r):
  for j in range(i+1,r+1):
    #lst.append(i*j%2019)
    if sum > i*j%2019:
      sum = i*j%2019
print(sum)
"""
#*/

### FIXED CODE ###

l, r = map(int, input().split())
tmp = 2019*(l//2019)
l -= tmp
r -= tmp
if r >= 2019:
  print(0)
else:
  m = 2020
  for i in range(l, r):
    for j in range(i+1, r+1):
      if m > i*j%2019:
        m = i*j%2019
  print(m)
a = int(input())
b = int(input())
c = a * b
d = 2 * (a + b)
print(c,d)



### FIXED CODE ###

a,b = (int(x) for x in input().split())
c = a * b
d = (a + b) * 2
print(c,d)
X, Y, Z, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

A.sort(reverse=True)
B.sort(reverse=True)
C.sort(reverse=True)

AB = []
for i in range(X):
    for j in range(Y):
        AB.append(A[i] + B[j])
AB.sort(reverse=True)

ABC = []
for i in range(K):
    for j in range(K):
        ABC.append(AB[i] + C[j])

ABC.sort(reverse=True)
for i in range(K):
    print(ABC[i])


### FIXED CODE ###

X, Y, Z, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

A.sort(reverse=True)
B.sort(reverse=True)
C.sort(reverse=True)

ABC = []
for i in range(X):
    for j in range(Y):
        if (i + 1) * (j + 1) > K:
            break
        for k in range(Z):
            if (i + 1) * (j + 1) * (k + 1) > K:
                break
            ABC.append(A[i] + B[j] + C[k])

ABC.sort(reverse=True)
for i in range(K):
    print(ABC[i])
def factorial(n):
    if n == 1:
        return n
    return n*factorial(n-1)

x,y = map(int, input().split())

if (x+y)%3 != 0:
    print(0)

ans = factorial((x+y)/3)/factorial((4*x-2*y)/6)

print(ans)

### FIXED CODE ###

#組み合わせの計算
def combi(n, r, mod):
    r = min(r, n-r)
    numer = denom = 1

    for i in range(r):
        numer = numer * (n-i) % mod
        denom = denom * (i+1) % mod
    return numer * pow(denom, mod-2, mod) % mod #逆元

x, y = map(int, input().split())
mod  = 10**9+7

n = (-x + 2*y)/3
m = (2*x -  y)/3

if (x+y)%3 != 0:
    print(0)
    exit()

if n < 0 or m < 0:
    print(0)
    exit()

ans = combi(int(n+m), int(n), mod)
print(ans)
n=int(input())
a=[int(input()) for i in range(n)]

ans_list=[]
for j in range(n):
    m=0
    while a[j]%2==0:
        m+=1
        a[j]=a[j]//2
    ans_list.append(m)
ans_list.sort()
print(ans_list[0])

### FIXED CODE ###

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

ans=0
for i in range(30):
    a=[a[j]/2 for j in range(n) if a[j]%2==0]
    ans+=1
    if len(a)!=n:
        break

print(ans-1)
i = input().split()
a = int(x[1])
b = int(x[-1])
print(a*b, (a+b)*2)

### FIXED CODE ###

x = input().split()
a = int(x[0])
b = int(x[1])
print(a*b, (a+b)*2)
X = int(input())

def nb(b):
    if b == 0:
        return 1
    elif b > 0:
        return -b
    else:
        return -b+1

b = 0

while 1:
    # print("b:",b)
    a_est = int((b**5+X)**0.2)
    if a_est**5-b**5==X:
        a = a_est
        break
    elif (a_est+1)**5-b==X:
        a = a_est+1
        break
    
    # print(a_est)
    b = nb(b)

print(a,b)

### FIXED CODE ###

X = int(input())

def nb(b):
    if b == 0:
        return 1
    elif b > 0:
        return -b
    else:
        return -b+1

b = 0

def fac(x):
    if x>=0:
        return x**0.2
    else:
        return -(-x)**0.2

while 1:
   
# for i in range(1):
    # print("b:",b)
    a_est = int(fac(b**5+X))
    if a_est**5-b**5==X:
        a = a_est
        break
    elif (a_est+1)**5-b==X:
        a = a_est+1
        break
    
    # print(a_est)
    b = nb(b)

print(a,b)
a = [0 for in range(s(len(s))]
n = int(raw_input())
s = map(int, raw_input().split())
m = int(raw_input())
t = map(int, raw_input().split())

s = list(set(s))
s.sort()
for i in s:
    a[i] += 1

count = 0
for i in t:
    count += a[i] 
print count

### FIXED CODE ###

n = int(raw_input())
s = map(int, raw_input().split())
m = int(raw_input())
t = map(int, raw_input().split())

s = list(set(s))
s.sort()
l = len(s)-1

count = 0
for i in t:
    low = 0
    high = l
    while low <= high:
        mid = (low+high)/2
        if s[mid] == i:
            count += 1
            break
        if s[mid] < i:
            low = mid+1
        else:
            high = mid-1

print count
N,L=map(int,input().split())
LL=[L+i for i in range(N)]
LLL=[abs(L+i) for i in range(N)]

if N+L<0:
  print(sum(LL)+min(LLL))
else:
  print(sum(LL)-min(LLL))

### FIXED CODE ###

S=input()
if S[0]==S[1] or S[1]==S[2] or S[2]==S[3]:
  print("Bad")
else:
  print("Good")
d = {"SUN":7,"MON":6,"TUE":5,"WEN":4,"THU":3,"FRI":2,"STR":1}

s = input()
print(d[s])

### FIXED CODE ###

d = {"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}

s = input()
print(d[s])
import math
def lcm_list(numbers):
    answer=numbers[0]
    for number in numbers:
        answer=(answer*number/math.gcd(answer,number))
    return answer
nm=list(map(int, input().split()))
a=list(map(int, input().split()))
n=nm[0]
m=nm[1]
b=0
while a[0]%2==0:
    for i in range(len(a)):
        if a[i]%2==0:
            a[i]=int(a[i]/2)
        else:
            b=1
            break
if b==1:
    print(0)
else:
    amc=lcm_list(a)
    #amc=math.gcd()
    print(int((m+amc)/(2*amc)))



### FIXED CODE ###

import fractions
from functools import reduce
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
nm=list(map(int, input().split()))
a=list(map(int, input().split()))
n=nm[0]
m=nm[1]
b=0
c=a[0]
dnum=0
while c%2==0:
    dnum+=1
    c=c//2
for i in range(len(a)):
    c=a[i]
    dnum1=0
    while c%2==0:
        dnum1+=1
        c=c//2
    #print(dnum)
    if dnum1!=dnum:
        b=1
        break

#print(a)
if b==1:
    print(0)
else:
    for i in range(len(a)):
        a[i]=a[i]//2
    #print(a)
    amc=lcm_list(a)
    #print(amc)
    # version3.5にてgcdがfractionsからmathに移動した
    print(int((m+amc)/(2*amc)))
a=list(map(int,input().split()))
n=0
zahyo=0
i=0
hane=list(map(int,input().split()))
while zahyo<=a[1]:
    n=n+1
    zahyo=zahyo+hane[i]
    i=i+1
print(n)

### FIXED CODE ###

a=list(map(int,input().split()))
n=1
zahyo=0
hane=list(map(int,input().split()))
for i in range(a[0]):
    if zahyo+hane[i]>a[1]:
        break
    else:
        zahyo=zahyo+hane[i]
        n=n+1
print(n)
def xxx(n):
    alpha = "abcdefghijklmnopqrstuvwxyz"
    ans = ""
    i = 0

    while True:
        if n <= 26 ** i:
            n -= 1
            while N > 0:
                ans = alpha[N%26-1] + ans
                N //= 26
            return ans
        else:
            n -= 26 ** i

            
N = int(input())
print(xxx(N))

### FIXED CODE ###

def xxx(n):
    alpha = "abcdefghijklmnopqrstuvwxyz"
    ans = ""
    i = 1

    while True:
        if n <= 26 ** i:
            n -= 1
            for j in range(i):
                ans = alpha[n%26] + ans
                n //= 26
            return ans
        else:
            n -= 26 ** i
            i += 1


N = int(input())
print(xxx(N))
n=int(input())
a=list(map(int,input().split()))

i=1
count=0

while i<n:
  if a[i]=a[i-1]:
    count+=1
    i+=2
  else:
    i+=1

print(count)

### FIXED CODE ###

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

i=1
count=0

while i<n:
  if a[i]==a[i-1]:
    count+=1
    i+=2
  else:
    i+=1

print(count)
import math

R = input()

try:
    R = int(R)
except:
    pass

if R =< 100 and R >= 1:
    return R*2*pi

### FIXED CODE ###

import math

R = input()

print(2 * float(R) * math.pi)
import array
#import random
import sys

#N, M = 100000, 100000
N, M = list(map(int, input().split()))
R = [[] for _ in range(N+1)]
sys.setrecursionlimit(200000)

def grp(R, i, S):
    S[i] = True
    ret = 1
    for j in range(len(R[i])):
        if S[ R[i][j] ]: continue
        ret += grp(R, R[i][j], S)
    return ret

for i in range(M):
    a, b = list(map(int, input().split()))
#    a, b = random.choice(range(N)), random.choice(range(N))
    R[a].append(b)
    R[b].append(a)

S = [False] * (N+1)
maxgrp = 1
for i in range(1, N+1):
    if S[i]: continue
    grpsize = grp(R, i, S)
#    print (grpsize)
    maxgrp = max(grpsize, maxgrp)

print(maxgrp)


### FIXED CODE ###

#import array
#import random
#import sys

#N, M = 200000, 200000
N, M = list(map(int, input().split()))
R = [[] for _ in range(N+1)]
G = [0] * (N+1)
Z = [0] * (N+1)

def grp(R, grpid, i, G, Z):
    stack = [i]
    while len(stack) > 0:
        k = stack.pop()
        if G[k] > 0: continue
        G[k] = grpid
        Z[grpid] += 1
        for l in range(len(R[k])):
            stack.append(R[k][l])
        
for i in range(M):
    a, b = list(map(int, input().split()))
#    a, b = random.choice(range(N)), random.choice(range(N))
    R[a].append(b)
    R[b].append(a)

grpid = 0
for i in range(1, N+1):
    if G[i] > 0: continue
    grpid += 1
    grp(R, grpid, i, G, Z)
    
Z.sort(reverse=True)
print(Z[0])