Harryxun/stf_run huggingface dataset:
n = int(input())
k = int(input())
import math
def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

count = 0
for i in range(1,len(str(n))):
    if i >= k:
        count += 9*comb(i-1,k-1)*(9**(k-1))
        

if k == 1:
    count += int(str(n)[0])
    print(count)
    exit()
if k == 2:
    count += (int(str(n)[0])-1)*9*(len(str(n))-1)
    
    count2 = 0
    for i in range(1,len(str(n))-1):
        if i >= 1:
            count2 += 9*comb(i-1,0)*(9**(0))
    count += int(str(n)[1])    
    print(count+count2)
    exit()

if k == 3:
    count += (int(str(n)[0])-1)*comb(len(str(n))-1,2)*81
    for i in range(1,len(str(n))-1):
        if i >= 2:
            count += 9*comb(i-1,2-1)*(9**(2-1))
    count += (int(str(n)[1])-1)*9*(len(str(n))-2)
    
    count2 = 0
    for i in range(1,len(str(n))-2):
        if i >= 1:
            count2 += 9*comb(i-1,0)*(9**(0))
    count += int(str(n)[2])    
    print(count+count2)
    exit()
        


    

### FIXED CODE ###

n = int(input())
k = int(input())

dp = [[[0]*(2) for i in range(k+1)] for j in range(len(str(n))+1)]

dp[0][0][0] = 1

for i in range(len(str(n))):
    for j in range(k+1):
        for m in range(2):
            nd = int(str(n)[i])
            for l in range(10):
                ni = i+1
                nj = j
                nm = m
                if l != 0:
                    nj += 1
                if nj > k:
                    continue
                if nm == 0:
                    if  l > nd:
                        continue
                    elif l < nd:
                        nm = 1
                dp[ni][nj][nm] += dp[i][j][m]
print(dp[len(str(n))][k][0]+dp[len(str(n))][k][1])
a,b,c =input().split()
if len(a)*len(b)*len(c) =175:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

a = list(map(int,input().split()))
b = 0
c = 0
for i in a:
  if i == 7:
    b += 1
  elif i == 5:
    c += 1
 
if b == 1 and c == 2:
  print("YES")
else:
  print("NO")
N = int(input())
alpha = [-1]
alpha.extend([chr(ord('a') + i) for i in range(26)])
q = N
mod = N
ans = ''
while q >= 27:
    q, mod = divmod(q, 26)
    ans = alpha[mod] + ans
if mod != 0:
    ans = alpha[q] + ans
print(ans)


### FIXED CODE ###

# 自力では解けなかった(2020.7.6)

alpha = ['Z']
alpha.extend([chr(ord('a') + i) for i in range(26)])
N = int(input())
q = N
ans = ''
while True:
    if q <= 26:
        ans += str(alpha[q])
        break
    else:
        q, mod = divmod(q, 26)
        if mod == 0:
            q -= 1
            mod = 26
        ans += str(alpha[mod])

print(ans[::-1])
A, B, C, X = map(int, input().strip().split())
count = 0

for a in range(A+1):
    for b in range(B+1):
        for c in range(C+1):
            if 500*a+100*b+50*c==X:
                count += 1
print(count)

### FIXED CODE ###

A = int(input())
B = int(input())
C = int(input())
X = int(input())
count = 0
for a in range(A+1):
    for b in range(B+1):
        for c in range(C+1):
            if 500*a+100*b+50*c==X:
                count += 1
print(count)
int(input(H,W,h,w))

s=(H-h)*(W-w)
print(s)


### FIXED CODE ###

H,W=map(int,input().split())
h,w=map(int,input().split())

print((H-h)*(W-w))
x = input()
x = x^3
print(x)


### FIXED CODE ###

x = int(input())
print(x*x*x)
A = int(input())
B = int(input())
if A >= 2B
    (print(A-2B))
else
    (print(0))

### FIXED CODE ###

A, B = map(int, raw_input().split())
if A >= 2 * B:
  print(A - 2 * B)
else:
  print(0)
n = int(input())
s = input()
ans = n

for i in s:
    L = s[:i]
    R = s[i+1:]
    turn = L.count("W") + R.count("E")
    if turn < ans:
        ans = turn

print(ans)


### FIXED CODE ###

n = int(input())
s = input()
list = []
E = s.count("E")
L = 0
check = 0 # 直前がWだったかの記憶装置

for i in s:
    if i == "E":
        E -= 1
        if check == 0:
            list.append(E+L) # E+Lが答えの候補
        elif check == 1:
            check = 0
            L += 1
            list.append(E+L)
    elif i == "W":
        if check == 0: # 一つ前がEのとき
            check = 1
            list.append(E+L)
        elif check == 1: # 一つ前がWのとき
            L += 1
            list.append(E+L)

print(min(list))
l1 = list(input())
k = l1.count('?')
for i in range(l1):
  if l1[i] == '?':
    l1[i] = 'D'
s = l1.join('')
print(s)

### FIXED CODE ###

l1 = list(input())
k = l1.count('?')
for i in range(len(l1)):
  if l1[i] == '?':
    l1[i] = 'D'
s = ''.join(l1)
print(s)
def main():
    from sys import stdin
    n,k = map(int,stdin.readline().rstrip().split())
    As = list(map(int,stdin.readline().rstrip().split()))
    As = [0]+As
    g = set({1})
    l = [0,1]
    now = 1
    for i in range(1,k+1):
        now = As[now]
        if now in g:
            break
            
        else:
            g.add(now)
            l.append(now)

    j = l.index(now)
    print(l[j+(k-i)%(i+1-j)])
main()

### FIXED CODE ###

def main():
    from sys import stdin
    n,k = map(int,stdin.readline().rstrip().split())
    As = list(map(int,stdin.readline().rstrip().split()))
    As = [0]+As
    g = set({1})
    l = [0,1]
    now = 1
    i = 0
    while True:
        i+=1
        now = As[now]
        if now in g:
            j = l.index(now)
            print(l[j+(k-i)%(i+1-j)])
            break
            
        else:
            g.add(now)
            l.append(now)
        
        if i == k:
            print(now)
            break
main()
a,b,c = map(int, input(),split())

if a < b < c:
    print "Yes"
else:
    print "No"

### FIXED CODE ###

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

if a < b < c:
    print("Yes")
else:
    print("No")
class Node(object):
    def __init__(self, N):
        self.p = [-1 for i in range(N)]
        self.l = [-1 for i in range(N)]
        self.r = [-1 for i in range(N)]
        self.D = [-1 for i in range(N)]
 
    def set_depth(self, u, p):
        self.D[u] = p
        if self.r[u] is not -1:
            self.set_depth(self.r[u], p)
        if self.l[u] is not -1:
            self.set_depth(self.l[u], p+1)
 
    def print_children(self, u):
        children = []
        flag = self.l[u]
        while flag is not -1:
            children.append(flag)
            flag = self.r[flag]
             
        return children
 
N = int(input())
T = Node(N)
 
for j in range(N):
    A = [int(i) for i in input().split()]
     
    if len(A) > 2:
        T.l[j] = A[2]
    else:
        T.l[j] = -1
 
    for index, i in enumerate(A[2:]):
        if(A[-1] == i):
            T.p[i], T.r[i] = A[0], -1
        else:
            T.p[i], T.r[i] = A[0], A[index+3]
 
T.set_depth(T.p.index(None), 0)
 
for i in range(N):
    if T.p[i] is -1:
        node = "root"
    elif T.l[i] is -1:
        node = "leaf"
    else:
        node = "internal node"
         
    print("node {0}: parent = {1}, depth = {2}, {3}, {4}".format(i, T.p[i], T.D[i], node, T.print_children(i)))

### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(100000)
class Node(object):
    # left????????¨??????????????????(leaf), right???s?????¨??????????????????????????????
    # ???????????????????????????????????¨???????????´??????parent???-1?????????
    def __init__(self, N):
        self.p = [-1 for i in range(N)]
        self.l = [-1 for i in range(N)]
        self.r = [-1 for i in range(N)]
        self.D = [0 for i in range(N)]

    def set_depth_rec(self, u, p):
        self.D[u] = p
        if self.r[u] is not -1:
            self.set_depth(self.r[u], p)
        if self.l[u] is not -1:
            self.set_depth(self.l[u], p+1)

    def set_depth(self, u):
        d = 0
        pre_u = u
        while self.p[u] is not -1:
            u = self.p[u]
            d += 1
        self.D[pre_u] = d

    def print_children(self, u):
        children = []
        flag = self.l[u]
        while flag is not -1:
            children.append(flag)
            flag = self.r[flag]
            
        return children
        

N = int(input())
T = Node(N)

for j in range(N):
    A = [int(i) for i in input().split()]
    
    # left????±????
    if len(A) > 2:
        T.l[A[0]] = A[2]
    else:
        T.l[A[0]] = -1

    # parent???right????±????
    for index, i in enumerate(A[2:]):
        if(A[-1] == i):
            T.p[i], T.r[i] = A[0], -1
        else:
            T.p[i], T.r[i] = A[0], A[index+3]
    
#T.set_depth_rec(T.p.index(-1), 0)
for i in range(N):
    T.set_depth(i)

for i in range(N):
    if T.p[i] is -1:
        node = "root"
    elif T.l[i] is -1:
        node = "leaf"
    else:
        node = "internal node"
        
    print("node {0}: parent = {1}, depth = {2}, {3}, {4}".format(i, T.p[i], T.D[i], node, T.print_children(i)))
N, M = map(int, input().split())
G = [[] for _ in range(N)]
x = [None] * (N)

def dfs(s):
    global x, G
    for t, d in G[s]:
        if x[t] is None:
            x[t] = x[s] + d
            if not dfs(t):
                return False
        else:
            if x[t] != x[s] + d:
                return False
    return True

for _ in range(M):
    L, R, D = map(int, input().split())
    G[L-1].append([R-1,  D])
    G[R-1].append([L-1, -D])

ans = True
for i in range(N):
    if x[i] is None:
        x[i] = 0
        ans &= dfs(i)

print("Yes" if ans else "No")

### FIXED CODE ###

import sys
sys.setrecursionlimit(200002)

N, M = map(int, input().split())
G = [[] for _ in range(N)]
x = [None] * (N)

def dfs(s):
    global x, G
    for t, d in G[s]:
        if x[t] is None:
            x[t] = x[s] + d
            if not dfs(t):
                return False
        else:
            if x[t] != x[s] + d:
                return False
    return True

for _ in range(M):
    L, R, D = map(int, input().split())
    G[L-1].append([R-1,  D])
    G[R-1].append([L-1, -D])

ans = True
for i in range(N):
    if x[i] is None:
        x[i] = 0
        ans &= dfs(i)

print("Yes" if ans else "No")
N, Q = map(int, input().split())

T = [[]for i in range(N)]

for i in range(N-1):
    a, b = map(int, input().split())
    T[a-1].append(b-1)
    T[b-1].append(a-1)

X = [0 for i in range(N)]
for i in range(Q):
    p, x = map(int, input().split())
    X[p-1] += x

# def dfs(x, p):
#     for j in T[x]:
#         if j == p:
#             continue
#         X[j] += X[x]
#         dfs(j, x)
def dfs(nownode,oya=-1):
    for nextnode in T[nownode]:
        if oya == nextnode:
            continue
        X[nextnode] += X[nownode]
        dfs(nextnode,nownode)

dfs(0, -1)

print(*X)


### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
 

N, Q = map(int, input().split())

T = [[]for i in range(N)]

for i in range(N-1):
    a, b = map(int, input().split())
    T[a-1].append(b-1)
    T[b-1].append(a-1)

X = [0 for i in range(N)]
for i in range(Q):
    p, x = map(int, input().split())
    X[p-1] += x

# def dfs(x, p):
#     for j in T[x]:
#         if j == p:
#             continue
#         X[j] += X[x]
#         dfs(j, x)
def dfs(nownode,oya=-1):
    for nextnode in T[nownode]:
        if oya == nextnode:
            continue
        X[nextnode] += X[nownode]
        dfs(nextnode,nownode)

dfs(0, -1)

print(*X)
N=int(input())
X=input()
a=int(X,2)

def popcount(x):
  return bin(x).count("1")
p=X.count('1')
pl=a%(p+1)
if popcount(x)!=1:
  mi=a%(p-1)

def f(x):
  if x==0:
    return 1
  else:
    return f(x%popcount(x))+1

for i in range(N):
  if X[i]=='0':
    b=pl
    b+=pow(2,N-i-1,p+1)
    b%=p+1
  else:
    if popcount(a)!=1:
      b=mi
      b-=pow(2,N-i-1,p-1)
      b%=p-1
    else:
      print(0)
      continue
  print(f(b))


### FIXED CODE ###

N=int(input())
X=input()
a=int(X,2)

def popcount(x):
  return bin(x).count("1")
p=X.count('1')

pl=a%(p+1)
if p!=1:
  mi=a%(p-1)

def f(x):
  if x==0:
    return 1
  else:
    return f(x%popcount(x))+1

for i in range(N):
  if X[i]=='0':
    b=pl
    b+=pow(2,N-i-1,p+1)
    b%=p+1
  else:
    if p!=1:
      b=mi
      b-=pow(2,N-i-1,p-1)
      b%=p-1
    else:
      print(0)
      continue
  print(f(b))
num = int(input())
s = ["".join(sorted(input())) for i in range(num)]

d =dict()

for st in s:
    if st in d:
        d[st]+=1
    else:
        d[st]=1

ans=0

for i in d:
    k=d[i]
    ans+=(k*(k-1))//2

print(ans)

### FIXED CODE ###

line = input().split()

a = int(line[0])
b = int(line[1])

print(max(a-b,a+b,a*b))
import numpy as np

N, K = map(int, input().split())
A = np.array(input().split(), dtype=np.int64)

B = 0
C = 0

for i in range(N):
    D = A[i::]
    B += np.sum(D < A[i]) % (10**9 + 7)
    C += np.sum(A < A[i]) % (10**9 + 7)
    
E = B * K % (10**9 + 7)
F = C * (np.sum(np.arange(K-1)+1) % (10**9 + 7)) % (10**9 + 7)

print(int((E+F) % (10**9 + 7)))

### FIXED CODE ###

import numpy as np

N, K = map(int, input().split())
A = np.array(input().split(), dtype=np.int64)

B = 0
C = 0

mod = 10**9 + 7

for i in range(N):
    D = A[i:]
    B = (B + np.sum(D < A[i])) % mod 
    C = (C + np.sum(A < A[i])) % mod 
    
k_sum = int((K-1) * K//2) % mod 

E = (B * K) % mod 
F = (C * k_sum) % mod 

print(int((E+F) % mod ))
N = int(input())
S = str(input())
dp = [[0 for i in range(N+1)] for i in range(N+1)]

for i in reversed(range(N)):
    for j in reversed(range(N)):
        if S[i] == S[j]:
            dp[i][j] = dp[i+1][j+1] + 1
ans = 0
for i in range(N):
    for j in range(N):
        if j > i:
            tmp = min(j-i,dp[i][j])
            ans = max(tmp,ans)
print(ans)

### FIXED CODE ###

S = input()
if S == 'Sunny':
    print('Cloudy')
elif S== 'Cloudy':
    print('Rainy')
else:
    print('Sunny')
from collections import defaultdict
def check():
  D = defaultdict(lambda: '')
  N, M = map(int, input().split())
  if M==0:
    return 'Yes'
  for i in range(M):
    l,r,d = map(int, input().split())
    if i==0:
      D[l] = 0
    if D[r]!='' and D[l]!='' and D[r] != D[l]+d:
      return 'No'
    D[r] = D[l]+d
  if max(D.values())-min(D.values())>10**9:
    return 'No'
  return 'Yes'
print(check())

### FIXED CODE ###

from collections import deque
def check():
  N, M = map(int, input().split())
  edge = [[] for _ in range(N)]
  for i in range(M):
    a,b,d = map(int, input().split())
    edge[a-1].append([b-1,d])
    edge[b-1].append([a-1,-d])
  
  visited = [float('inf')]*N
  D = deque()
  for i in range(N):
    if visited[i]==float('inf'):
      visited[i]=0
      D.append(i)
      while len(D)>0:
        v = D.popleft()
        for w,d in edge[v]:
          if visited[w]==float('inf'):
            visited[w] = visited[v]+d
            D.append(w)
          elif visited[w]!=visited[v]+d:
            return 'No'
  return 'Yes'
print(check())
input()
s=map(int,input().split(' '))
s=list(s)
s=sorted(s)
n=len(s)
print(s[int(n/2)]-s[int(n/2-1)])

### FIXED CODE ###

s=input()
d={}
for ss in s:
  d[ss]=0
for ss in s:
  d[ss]+=1
if len(d.keys())==2:
  f=True
  for k in d:
    if d[k]!=2:
      f=False
  if f :
    print("Yes")
  else:
    print("No")
else:
  print("No")
n = int(input())
import math
def main():
    m = int(input())
    for _ in range(n-1):
        t = int(input())
        m = m*t//math.gcd(m,t)

    print(m)

if __name__ == "__main__":
    main()

### FIXED CODE ###

from fractions import gcd
def main():
    n = int(input())
    m = int(input())
    for _ in range(n-1):
        t = int(input())
        m = m*t//gcd(m,t)

    print(m)

if __name__ == "__main__":
    main()
# -*- coding: utf-8 -*-
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N_all = int(readline())
A_all = list(map(int,readline().split()))
A = [A_all[0]]
for i in range(1,N_all):
    if A[-1] != A_all[i]:
        A.append(A_all[i])
N = len(A) 
money = 1000
kabu = 0 
for i in range(N):
    money += A[i]*kabu
    kabu = 0
    if i == 0:
        if A[i] < A[i+1]:
        	kabu = money // A[i]
        	money -= kabu * A[i]
    elif A[i-1] > A[i] and A[i] < A[i+1] and i < N-1: 
        kabu = money // A[i]
        money -= kabu * A[i]
print(money)

### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N_all = int(readline())
A_all = list(map(int,readline().split()))
A = [A_all[0]]
for i in range(1,N_all):
    if A[-1] != A_all[i]:
        A.append(A_all[i])
N = len(A) 
if N == 1:
    print(1000)
    sys.exit()
money = 1000
kabu = 0 
for i in range(N):
    if i == 0:
        if A[i] > A[i+1]:
            continue
        else:
        	kabu = money // A[i]
        	money -= kabu * A[i]
    elif i == N-1:
        money += A[i]*kabu
        kabu = 0
    else:
        if A[i-1] < A[i] and A[i] > A[i+1]:
            money += A[i]*kabu
            kabu = 0
        if A[i-1] > A[i] and A[i] < A[i+1]:
            kabu = money // A[i]
            money -= kabu * A[i]
print(money)
X = int(input())
Y = int(input())
Z = int(input())
M = X
X = Y
Y = M
M = X
X = Z
Z = M
print(X,Y,Z)


### FIXED CODE ###

X,Y,Z = map(int,input().split())
X,Y = Y,X
X,Z = Z,X
print(X,Y,Z)
n=int(input())
a=[int(j) for j in input().split()]

def f(l,m):
    if l==[]:
        return -10**100
    if m==1:
        return max(l)
    return max(f(l[1:],m),l[0]+f(l[2:],m-1))

print(f(a,n//2))

### FIXED CODE ###

n=int(input())
a=[int(j) for j in input().split()]
p=[0]*n
d=[0]*n
for i in range(n):
    p[i]=a[i]+p[i-2]
    if (i&1):
        d[i]=max(p[i-1],a[i]+d[i-2])
    else:
        d[i]=max(d[i-1],a[i]+d[i-2])
print(d[-1])
import sys
import sympy

# 実行環境(0:vscode, 1:atcoder)
MODE = 1

# 入力の次元
DIMENSION = 0

# int型に変換
INT_TYPE = 1

if not (MODE):
    with open("input.txt", "r") as f:
        s = f.read()
else:
    s = sys.stdin.read()

if DIMENSION == 0:
    if INT_TYPE == 1:
        s = int(s)
elif DIMENSION == 1:
    if INT_TYPE == 0:
        s = s.split()
    elif INT_TYPE == 1:
        s = [int(x) for x in s.split()]
elif DIMENSION == 2:
    if INT_TYPE == 0:
        s = [x.split() for x in s.splitlines()]
    elif INT_TYPE == 1:
        s = [[int(y) for y in x.split()] for x in s.splitlines()]


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


F = factorization(s)

cnt = 0
for i in range(len(F)):
    num = 1
    while 1:
        F[i][1] -= num
        if F[i][1] < 0:
            break
        else:
            num += 1
            cnt += 1
print(cnt)


### FIXED CODE ###

import sys

# 実行環境(0:vscode, 1:atcoder)
MODE = 1

# 入力の次元
DIMENSION = 0

# int型に変換
INT_TYPE = 1

if not (MODE):
    with open("input.txt", "r") as f:
        s = f.read()
else:
    s = sys.stdin.read()

if DIMENSION == 0:
    if INT_TYPE == 1:
        s = int(s)
elif DIMENSION == 1:
    if INT_TYPE == 0:
        s = s.split()
    elif INT_TYPE == 1:
        s = [int(x) for x in s.split()]
elif DIMENSION == 2:
    if INT_TYPE == 0:
        s = [x.split() for x in s.splitlines()]
    elif INT_TYPE == 1:
        s = [[int(y) for y in x.split()] for x in s.splitlines()]

if s == 1:
    print(0)
else:

    def factorization(n):
        arr = []
        temp = n
        for i in range(2, int(-(-n**0.5//1))+1):
            if temp % i == 0:
                cnt = 0
                while temp % i == 0:
                    cnt += 1
                    temp //= i
                arr.append([i, cnt])

        if temp != 1:
            arr.append([temp, 1])

        if arr == []:
            arr.append([n, 1])

        return arr

    F = factorization(s)

    cnt = 0
    for i in range(len(F)):
        num = 1
        while 1:
            F[i][1] -= num
            if F[i][1] < 0:
                break
            else:
                num += 1
                cnt += 1
    print(cnt)
s = input()
t = input()

s = sorted(s)
t = reversed(sorted(t))

if s < t:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

s = input()
t = input()

s = sorted(s)
t = list(reversed(sorted(t)))

if s < t:
  print('Yes')
else:
  print('No')
import sys
from collections import deque
input = sys.stdin.readline

N, K = map(int, input().split())
V = deque(list(map(int, input().split())))
score = deque()

for i in range(K+1): #左から
    for j in range(K-i+1): #右から
        hand = deque()
        for n in range(i): #左から
            hand.append(V[n]) 
        for m in range(j): #右から
            hand.append(V[N-m-1])
        for k in range(K-i-j):
            if len(hand) > 0 and min(hand) < 0:
                hand.remove(min(hand)) 
        score.append(sum(hand))

print(max(score))

### FIXED CODE ###

import sys
from collections import deque
input = sys.stdin.readline

N, K = map(int, input().split())
V = deque(list(map(int, input().split())))
score = deque()

for i in range(K+1): #左から
    for j in range(K-i+1): #右から
        hand = deque()
        if i + j <= N:
            for n in range(i): #左から
                hand.append(V[n]) 
            for m in range(j): #右から
                hand.append(V[N-m-1])
            for k in range(K-i-j):
                if len(hand) > 0 and min(hand) < 0:
                    hand.remove(min(hand)) 
            score.append(sum(hand))

print(max(score))
S=input()
 
if S == 'Sunny':
	print("Cloudy)
elif S == 'Rainy':
	print('Sunny')
else:
	print('Rainy')

### FIXED CODE ###

S=input()
 
if S == 'Sunny':
  print('Cloudy')
elif S == 'Cloudy':
  print('Rainy')
else:
  print('Sunny')
n=input()
pm=[+,-]
for op1 in pm:
  for op2 in pm:
    for op3 in pm:
      if (n[0] op1 n[1] op2 n[2] op3 n[3])==7:
        print("n[0] op1 n[1] op2 n[2] op3 n[3]=7")

### FIXED CODE ###

import sys
n=input()
op= ['+', '-']
for op1 in op:
    for op2 in op:
        for op3 in op:
            a = n[0]+op1+n[1]+op2+n[2]+op3+n[3]
            if eval(a) == 7:
                print(a+'=7')
                sys.exit()
input = input().split()

a = input[0] * input[1]

if (a/2 == 0):
	print("Even")
else
	print("Odd")

### FIXED CODE ###

input = input().split()

a = int(input[0]) * int(input[1])

if (a%2 == 0):
	print("Even")
else:
	print("Odd")
b=input()
if b==("A"):
  print("T")
if b==('T'):
  print("A")
if b==('G'):
  print('C'):
else:
  print('G')

### FIXED CODE ###

b=input()
if b==("A"):
  print("T")
elif b==('T'):
  print("A")
elif b==('G'):
  print("C")
else:
  print('G')
import sys
import collections
ns = lambda: sys.stdin.readline().rstrip()
ni = lambda: int(ns())
nm = lambda: map(int, sys.stdin.readline().split())
nl = lambda: list(nm())
nsm = lambda: map(str, sys.stdin.readline().split())
nsl = lambda: list(nsm())

mod = 1000000007

n, m = nm()
dp = [0] * (n + 2)
for i in range(m):
    tmp = ni()
    dp[tmp] = -1
dp[0] = 1
for i in range(n):
    if i + 1 <= n:
        if dp[i + 1] != -1 and dp[i] != -1:
            dp[i + 1] += dp[i] % mod
            dp[i + 1] %= mod
    if i + 2 <= n:
        if dp[i + 2] != -1 and dp[i] != -1:
            dp[i + 2] += dp[i] % mod
            dp[i + 2] %= mod
if dp[n] = -1:
    print(0)
else:
    print(dp[n] % mod)


### FIXED CODE ###

import sys
import collections
ns = lambda: sys.stdin.readline().rstrip()
ni = lambda: int(ns())
nm = lambda: map(int, sys.stdin.readline().split())
nl = lambda: list(nm())
nsm = lambda: map(str, sys.stdin.readline().split())
nsl = lambda: list(nsm())

mod = 1000000007

n, m = nm()
dp = [0] * (n + 1)
for i in range(m):
    tmp = ni()
    dp[tmp] = -1
dp[0] = 1
for i in range(n):
    if i + 1 < n + 1 and dp[i + 1] != -1 and dp[i] != -1:
        dp[i + 1] += dp[i] % mod
        dp[i + 1] %= mod
    if i + 2 < n + 1 and dp[i + 2] != -1 and dp[i] != -1:
        dp[i + 2] += dp[i] % mod
        dp[i + 2] %= mod
print(dp[n] % mod)
weather = ["Sunny","Cloudy","Rainy"]
S = input()
today = weather.index(S)
tomorrow = int(today) + 1
print(weather[tomorrow])

### FIXED CODE ###

S = input()
if S == "Sunny":
  print("Cloudy")
elif S == "Cloudy":
  print("Rainy")
elif S == "Rainy":
  print("Sunny")
H,W = map(int,input().split())
alp = 'ABCDEFGHIJ'
for i in range(H):
  for j,s in enumerate(input().split()):
    if s == 'snuke':
      print(alp[j]+str(i+1))
      exit()

### FIXED CODE ###

H,W = map(int,input().split())
alp = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in range(H):
  for j,s in enumerate(input().split()):
    if s == 'snuke':
      print(alp[j]+str(i+1))
      exit()