Harryxun/stf_run huggingface dataset:
a,b,c=map(int, input().split())
if a>b:
 i=a
 a = b
 b = i
if b>c:
 i=b
 b=c
 c=b
if a>c:
 i=a
 a=c
 c=i

str="{d} {e} {f}"
print(str.format(d=a, e=b, f=c)

### FIXED CODE ###

a,b,c=map(int, input().split())
if a>b:
 i=a
 a = b
 b = i
if b>c:
 i=b
 b=c
 c=i
if a>b:
 i=a
 a=b
 b=i

str="{d} {e} {f}"
print(str.format(d=a, e=b, f=c))
from math import pow



N, K = map(int, input().split())
records = [map(int, input().split()) for i in range(N)]


def compute_score(target_collection):
    keys = {neta_point[0] for neta_point in target_collection}
    points = [neta_point[1] for neta_point in target_collection]
    cardinality = len(keys)
    score = pow(cardinality, 2) + sum(points)
    return score

# exchange one record and compare
def optimize(full_collection, target_collection, target_collection_len, idx):
    while True:
        ex_record = full_collection[idx]
        # check on the idx-th record
        idx += 1
        # bump up for return value
        if ex_record in target_collection:
            continue # cardinality score will not increase
        else:
            for i in range(target_collection_len-1):
                if target_collection[i][0] == target_collection[i-1][0]:
                    target_collection[i] = ex_record
                    new_score = compute_score(target_collection)
                    return new_score, target_collection, idx
        # default
        return 0, target_collection, idx



def cal_score(N, K, records):
    sorted_recs = sorted(records, reverse=True, key=lambda x: x[1])
    target_collection = sorted_recs[0:K]
    score =  compute_score(target_collection)

    # optimzie at most K times
    idx = K
    for i in range(K):
        new_score, new_target_collection, idx = optimize(sorted_recs, target_collection, K, idx)
        if new_score <= score: # no optimization occured
            break
        else:
            score = new_score
    return score
 
score =cal_score(N, K, record)
print(score)


### FIXED CODE ###

from math import pow
from collections import deque, Counter
import sys
stdin = sys.stdin
def li(): return map(int, stdin.readline().split())

def cal_score(N, K, records):
    sorted_recs = sorted(records, key=lambda x: -x[1])
    target_queue = deque(sorted_recs[0:K]) # only allow pop() action, so use dequeue
    compare_queue = deque(sorted_recs[K:])
    distinct_set = set()
    dup_queue = deque()
    score = 0
    for neta_point in target_queue:
        score += neta_point[1]
        if neta_point[0] not in distinct_set:
            distinct_set.add(neta_point[0])
        else:
            dup_queue.append(neta_point)

    cardinality = len(distinct_set)
    score += pow(cardinality, 2)
    score = int(score)
    new_scores = deque()
    new_scores.append(score)
    # start iteration and comparing gain and lost
    while compare_queue:
        comp = compare_queue.popleft()
        if comp[0] in distinct_set:
            continue
        elif len(dup_queue) < 1:
            break
        else:
            old = dup_queue.pop()
            inc = 2 * len(distinct_set) + 1
            dec = old[1] - comp[1]
            delta = inc - dec
            new_score = new_scores[-1] + delta
            new_scores.append(new_score)

            distinct_set.add(comp[0])
    # both queues are drained
    return max(new_scores)

N, K = li()
records = [tuple(li()) for i in range(N)]
score = cal_score(N, K, records)
print(score)
=int(input()) 
L=list(map(int, input().split())) 
L.sort()
 
def binary_search(list, item):
    low = 0
    high = len(list) - 1
    
    while low <= high:
        if item > list[high]:
          return high+1
          break
        mid = (low + high) //2
        guess = list[mid]
        if guess == item:
          return mid
        elif guess > item:
          high = mid -1
          if list[mid-1] < item:
            return mid-1
            break
        elif guess < item:
          low = mid + 1
          if list[mid+1] > item:
            return mid+1
            break
        else:
          print('error')
 
    return 0
 
 
count = 0        
for i in range(n-1):
  for k in range(i+1,n-1):
    a,b =L[i],L[k]
    L_temp = L[k+1:]
    binary_search(L_temp, a+b)
    count = count + binary_search(L_temp, a+b)
    
print(count)

### FIXED CODE ###

import bisect
n=int(input()) 
L=list(map(int, input().split())) 
L.sort()

count = 0        
for i in range(n-2):
  a = L[i]
  for k in range(i+1,n-1):
    b = L[k]

    count += bisect.bisect_left(L, a + b) - k -1
print(count)
class tree:
    def __init__(self,name,parent,left,right):
        self.name = name
        self.parent = parent
        self.left = left
        self.right = right
trees = {}
trees['0'] = tree('0','-1','-1','-1')

n = int(input())
for i in range(n):
    s = [i for i in input().split()]
    p = s[0]
    k = s[1]

    s_t = ['-1']+s[2:]+['-1']
    for j in range(1,int(k)+1):
        trees[s_t[j]] = tree(s_t[j],p,s_t[j-1],s_t[j+1])

def getDepth(u):
    d = 0
    while trees[u].parent != '-1':
        u = trees[u].parent
        d += 1
    return d

def getChildren(u):
    c = []
    for i in trees.values():
        if i.parent == u:
            c.append(i.name)
    return c

for i in range(n):
    
    par = trees[str(i)].parent
    dep = getDepth(str(i))
    r = trees[str(i)].right
    l = trees[str(i)].left
    ch = sorted([int(i) for i in getChildren(str(i))])
    
    if par == '-1':sit = 'root'
    elif l == '-1':sit = 'internal node'
    else:sit = 'leaf'
    
    print('node {}: parent = {}, depth = {}, {}, {}'.format(i,par,dep,sit,ch))


### FIXED CODE ###

class tree:
    def __init__(self,name,parent):
        self.name = name
        self.parent = parent
        
        
n = int(input())
trees = {str(i):tree(str(i),'-1') for i in range(n)}
child = {}

for i in range(n):
    s = [i for i in input().split()]
    p = s[0]
    child[p] = s[2:]
    s_t = s[2:]
    for j in range(len(s_t)):
        trees[s_t[j]] = tree(s_t[j],p)

def getDepth(u):
    d = 0
    while trees[u].parent != '-1':
        u = trees[u].parent
        d += 1
    return d

def getChildren(u):
    c = []
    for i in trees.values():
        if i.parent == u:
            c.append(i.name)
    return c

for i in range(n):
    
    par = trees[str(i)].parent
    dep = getDepth(str(i))
    ch = [int(i) for i in child[str(i)]]
    
    if par == '-1':sit = 'root'
    elif len(ch) != 0:sit = 'internal node'
    else:sit = 'leaf'
    
    print('node {}: parent = {}, depth = {}, {}, {}'.format(i,par,dep,sit,ch))
N,K = map(int,input().split())
R,S,P = map(int,input().split())
T = input()

# 相手の手がkeyだった時に勝つと得られるポイント
score = {"s":R,"p":S,"r":P}
# K手前が同じ手だったフラグ
flag = [False for i in range(N)]
ans = 0
for i in range(N):
    if (flag[i]):
        s += "l"
    else:
        ans += score[T[i]]
        s += "w"
        if (N-i-1 >= K):
            if (T[i] == T[i+K]):
                flag[i+K] = True

print(ans)


### FIXED CODE ###

N,K = map(int,input().split())
R,S,P = map(int,input().split())
T = input()

# 相手の手がkeyだった時に勝つと得られるポイント
score = {"s":R,"p":S,"r":P}
# K手前が同じ手だったフラグ
flag = [False for i in range(N)]
ans = 0
for i in range(N):
    if (flag[i]):
        pass
    else:
        ans += score[T[i]]
        if (N-i-1 >= K):
            if (T[i] == T[i+K]):
                flag[i+K] = True

print(ans)
#068-C
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return input()
import numpy as np
n,m=IL()
nm=np.zeros((n,n))
for i in range(m):
    a,b=IL()
    nm[a-1][b-1]=1
    nm[b-1][a-1]=1
nm=nm.dot(nm)
if nm[0][n-1]==0:
    print("IMPOSSIBLE")
else:
    print("POSSIBLE")

### FIXED CODE ###

#068-C
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return input()

n,m=IL()
nl=[[] for i in range(n)]
for i in range(m):
    a,b=IL()
    nl[a-1].append(b-1)
for i in nl[0]:
    if n-1 in nl[i]:
        print("POSSIBLE")
        break
else:
    print("IMPOSSIBLE")
n = int(input())
s = [int(input()).split() for i range(n)]
print( 'Yes' if max(s) < sum(s)-max(s) else 'No')


### FIXED CODE ###

n = int(input())
s = list(map(int,input().split()))
print( 'Yes' if max(s) < sum(s)-max(s) else 'No')
def f(exponent):
	#reurns how many times a prime raised to exponent can be used
	step = 1
	cumul = 0
	count = 0
	while( cumul <= exponent):
		cumul += step
		count +=1
		step +=1
	return count - (1 if cumul > exponent else 0)

def answer(n):
	if n == 1: return 0
	res = 0
	on = n
	for d in range(2, int(n ** 0.5) + 1)
		if n % d == 0:
			e = 0
			while(n%d == 0): e +=1
			res+= f(e)
		
	return res if n == 1 else 1

print answer(int(raw_input()))

### FIXED CODE ###

def f(exponent):
	#reurns how many times a prime raised to exponent can be used
	step = 1
	cumul = 0
	count = 0
	while( cumul <= exponent):
		cumul += step
		count +=1
		step +=1
	return count - (1 if cumul > exponent else 0)

def answer(n):
	if n == 1: return 0
	res = 0
	on = n
	p = True
	for d in range(2, int(on ** 0.5) + 2):
		if n % d == 0:
			p = False
			e = 0
			while(n%d == 0): 
				e +=1
				n/=d
			res+= f(e)
	if n > 1: res += 1
	return res

print answer(int(raw_input()))
import fractions

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

C = fractions.gcd(A, B)

def factorize(n):
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        b += 1
    if n > 1:
        fct.append(n)
    return act

print(len(list(set(factorize(C))) + 1)

### FIXED CODE ###

import fractions

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

C = fractions.gcd(A, B)

def factorize(n):
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        b += 1
    if n > 1:
        fct.append(n)
    return fct

print(len(list(set(factorize(C)))) + 1)
import math
N = input()

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

ans = float("inf")

for a in list:
    ans = min(ans, len(bin(a)) - bin(a).rfind("1") - 1)
print(round(ans))

### FIXED CODE ###

print(input().count("1"))
S = int(input())
h = S//3600
m = (S%3600)//60
s = (S%3600)%60
print(h:m:s)

### FIXED CODE ###

S = int(input())
h = S//3600
m = (S%3600)//60
s = (S%3600)%60
print('{0}:{1}:{2}'.format(h,m,s))
while 1:
   H, W = map(int, raw_input().split())
 
   if (H == 0 and W == 0): 
    break
   for i in range(H):
    if(i==0):
     print "#"*W
    elif(i==h-1):
     print "#"*W
    else:
     print "#"*
     print "."*(W-2)
     print "#"*

   print ""

### FIXED CODE ###

while True:
   H, W = map(int, raw_input().split())
 
   if (H == 0 and W == 0): 
    break
   for i in range(H):
    if(i==0):
     print "#"*W
    elif(i==H-1):
     print "#"*W
    else:
     print ("#"+"."*(W-2)+"#")

   print ""
from collections import defaultdict as dd
from itertools import combinations
from sys import exit
n = int(input())
if n == 1:
    print(1)

Points = []
for i in range(n):
    Points.append(list(map(int, input().split())))

Vector = dd(lambda: 0)
for point1, point2 in combinations(Points, 2):
    if point1[0] >= point2[0]:
        x_v = point1[0] - point2[0]
        y_v = point1[1] - point2[1]
    else:
        x_v = point2[0] - point1[0]
        y_v = point2[1] - point1[1]
    Vector[(x_v, y_v)] += 1

print(max(n - max(Vector.values()), 1))



### FIXED CODE ###

from collections import defaultdict as dd
from itertools import combinations
from sys import exit
n = int(input())
if n == 1:
    print(1)
    exit()

Points = []
for i in range(n):
    Points.append(list(map(int, input().split())))

Vector = dd(lambda: 0)
for point1, point2 in combinations(Points, 2):
    if point1[0] > point2[0]:
        x_v = point1[0] - point2[0]
        y_v = point1[1] - point2[1]
    elif point1[0] == point2[0] and point1[1] >= point2[1]:
        x_v = point1[0] - point2[0]
        y_v = point1[1] - point2[1]
    else:
        x_v = point2[0] - point1[0]
        y_v = point2[1] - point1[1]
    Vector[(x_v, y_v)] += 1
#print(Vector)

print(max(n - max(Vector.values()), 1))
import math
# A, B, H, M = 3, 4, 9, 0
A, B, H, M = map(int, input().split())

deg = 0
deg += 5.5 * M
deg -= 30 * H

print(math.sqrt(A**2 + B**2 - 2*A*B* math.cos(math.radians(abs(deg)))))

### FIXED CODE ###

one = int(input()) % 10


hon_list = [2, 4, 5, 7, 9]

if one in hon_list:
    print('hon')
elif 3 == one:
    print('bon')
else:
    print('pon')
def s0():return input()
def s1():return input().split()
def s2(n):return [input() for x in range(n)]
def s3(n):return [input().split() for _ in range(n)]
def s4(n): return [[x for x in s] for s in s2(n)]
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]
def t3(n):return [tuple(int(x) for x in input().split()) for _ in range(n)]
def p0(b,yes="Yes",no="No"): print(yes if b else no)
# from sys import setrecursionlimit
# setrecursionlimit(1000000)
# from collections import Counter,deque,defaultdict
# import itertools
# import math
# import networkx
# from bisect import bisect_left,bisect_right
# from heapq import heapify,heappush,heappop
# from fractions import gcd
from math import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
a,b,c,d=n1()
a1=b//c
a2=(a-1)//c
b1=b//d
b2=(a-1)//d
l=lcm(c,d)
c1=b//l
c2=(a-1)//l
ans=a1-a2+b1-b2-c1+c2
print(b-a+1-ans)

### FIXED CODE ###


def s0():return input()
def s1():return input().split()
def s2(n):return [input() for x in range(n)]
def s3(n):return [input().split() for _ in range(n)]
def s4(n): return [[x for x in s] for s in s2(n)]
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]
def t3(n):return [tuple(int(x) for x in input().split()) for _ in range(n)]
def p0(b,yes="Yes",no="No"): print(yes if b else no)
# from sys import setrecursionlimit
# setrecursionlimit(1000000)
# from collections import Counter,deque,defaultdict
# import itertools
# import math
# import networkx
# from bisect import bisect_left,bisect_right
# from heapq import heapify,heappush,heappop
from fractions import gcd
# from math import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
a,b,c,d=n1()
a1=b//c
a2=(a-1)//c
b1=b//d
b2=(a-1)//d
l=lcm(c,d)
c1=b//l
c2=(a-1)//l
ans=a1-a2+b1-b2-c1+c2
print(b-a+1-ans)
A = list(map(int, input().split()))

B = [0]*N

num = 0
for i in reversed(range(N)):
    B[i] = A[i] + num
    num = B[i]
    
ans = 0
for i in range(N-1):
    ans += A[i]*B[i+1] 

print(ans%1000000007)

### FIXED CODE ###

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

B = [0]*N

num = 0
for i in reversed(range(N)):
    B[i] = A[i] + num
    num = B[i]
    
ans = 0
for i in range(N-1):
    ans += A[i]*B[i+1] %1000000007

print(ans%1000000007)
K = int(input())
list = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(list[K+1])

### FIXED CODE ###

list = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
K = int(input())
if K < 32:
    print(list[K-1])
else:
    print(list[31])
import math

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

n = int(input())

s = math.floor(n / (a + b))
m = n % (a + b)

if a > m:
    print(a * s + m)
else:
    print(a * s + a)

### FIXED CODE ###

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

result = 0
result += N // (A + B) * A
result += min(N % (A + B), A)
print(result)
import sys
input = sys.stdin.readline
s = input()
n = len(s)
a = []
i = 0
ct = 0
for i in range(n):
    a.append(int(s[i]))
i = -1

while ct < 100000000000:
    n = len(a)
    i += 1
    if i >= n - 1: break
    if a[i] == 0 and a[i + 1] == 1:
        a.pop(i)
        a.pop(i)
        ct += 1
        i -= 2
        if i <= 1: i = -1
        continue
    elif a[i] == 1 and a[i + 1] == 0:
        a.pop(i)
        a.pop(i)
        ct += 1
        i -= 2
        if i <= 1: i = -1

print(ct * 2)


### FIXED CODE ###

S=list(input())
ans=0

print(len(S)-abs(S.count('0')-S.count('1')))
N,K=map(int, input().split())
A = list(map(int, input().split()))

A = [0] + A

visited = [1]
now = 1
short = 0
while True:
  next = A[now]
  if next in visited:
    break
  visited.append(next)
  if len(visited)==K:
    short = 1
    break
  now = next

if short: print(visited[K])
else:
  initial = visited.index(next)
  cycle = len(visited[initial:])
  if K >= cycle:
    residual = (K - initial) % cycle
    print(visited[initial+residual])
  else:
    print(visited[K])

### FIXED CODE ###

N,K=map(int,input().split())
*A,=map(int,input().split())

vis=[0]*(N+1)
now=1
vis[now] = 1
his=[now]
while 1:
  new = A[now-1]
  if vis[new]==0:
    vis[new]=1
    his.append(new)
    now = new
  else:
    idx = his.index(new)
    cycle = his[idx:]
    margin = his[:idx]
    break
    
if K <= len(margin):
  print(his[K])
  exit()
  
K -= len(margin)
K %= len(cycle)

print(cycle[K])
k = int(input())
lunlun = [0] * 100
lunlun[1] = [1, 2, 3, 4, 5, 6, 7, 8, 9]
i = 1

for i in range(9):
    n = len(lunlun[i])
    lunlun[i+1] = []
    for x in lunlun[i]:
        r = x%10
        if r > 0:
            lunlun[i+1].append(10*x + r-1)
        lunlun[i+1].append(10*x + r)
        if r < 9:
            lunlun[i+1].append(10*x + r+1)
    i += 1

for i in range(1, 11):
    for j in range(len(lunlun[i])):
        k -= 1
        if k == 0:
            print(lunlun[i][j])
            exit()


### FIXED CODE ###

k = int(input())
lunlun = [0] * 100
lunlun[1] = [1, 2, 3, 4, 5, 6, 7, 8, 9]
i = 1

for _ in range(9):
    n = len(lunlun[i])
    lunlun[i+1] = []
    for x in lunlun[i]:
        r = x%10
        if r > 0:
            lunlun[i+1].append(10*x + r-1)
        lunlun[i+1].append(10*x + r)
        if r < 9:
            lunlun[i+1].append(10*x + r+1)
    i += 1

for i in range(1, 11):
    for j in range(len(lunlun[i])):
        k -= 1
        if k == 0:
            print(lunlun[i][j])
            exit()
if S == 'Sunny'
    print('Cloudy')
elif S == 'Cloudy'
    print('Rainy')
else:
    print('Sunny')

### FIXED CODE ###

S = input()

if S == 'Sunny':
    print('Cloudy')
elif S == 'Cloudy':
    print('Rainy')
else:
    print('Sunny')
N,W=map(int,input().split())
wv=[]
for i in range(N):
    a,b=map(int,input().split())
    wv.append((a,b))
if wv[0][0]<300:
    dp=[[0]*(30000+1) for i in range(N+1)]
    for i in range(1,N+1):
        wi,vi=wv[i-1]
        for j in range(1,30000+1):
            dp[i][j]=dp[i-1][j]
            if j-wi<0:
                continue
            dp[i][j]=max(dp[i-1][j-wi]+vi,dp[i][j])
    ans=dp[N][W]
    print(ans)
    quit()
dp=[[0]*(301*101) for i in range(N+1)]
d=wv[0][0]
def change(n):
    return 301*(n//d)+n%d
#if change(W)>301*101:
#    quit()
for i in range(1,N+1):
    wi,vi=wv[i-1]
    z=301+(wi-d)
    for j in range(1,301*101):
        dp[i][j]=dp[i-1][j]
        if j-z<0:
            continue

        dp[i][j]=max(dp[i-1][j-z]+vi,dp[i][j])
ans=dp[N][change(W)]
print(ans)


### FIXED CODE ###

N,W=map(int,input().split())
wv=[]
for i in range(N):
    a,b=map(int,input().split())
    wv.append((a,b))
if wv[0][0]<300:
    dp=[[0]*(30000+1) for i in range(N+1)]
    for i in range(1,N+1):
        wi,vi=wv[i-1]
        for j in range(1,30000+1):
            dp[i][j]=dp[i-1][j]
            if j-wi<0:
                continue
            dp[i][j]=max(dp[i-1][j-wi]+vi,dp[i][j])
    ans=dp[N][W]
    print(ans)
    quit()
dp=[[0]*(301*101) for i in range(N+1)]
d=wv[0][0]
def change(n):
    return 301*(n//d)+min(n%d,300)
#if change(W)>301*101:
#    quit()
for i in range(1,N+1):
    wi,vi=wv[i-1]
    z=301+(wi-d)
    for j in range(1,301*101):
        dp[i][j]=dp[i-1][j]
        if j-z<0:
            continue

        dp[i][j]=max(dp[i-1][j-z]+vi,dp[i][j])
ans=dp[N][change(W)]
print(ans)
#: Author - Soumya Saurav
import sys,io,os,time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect,math,heapq
alphabet = "abcdefghijklmnopqrstuvwxyz"

input = sys.stdin.readline

########################################

n = int(input())
arr = list(map(int , input().split()))
ans = 0
for i in range(1,n+1):
	if arr[i]&1 and i&1:
		ans+=1
print(ans)









### FIXED CODE ###

#: Author - Soumya Saurav
import sys,io,os,time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect,math,heapq
alphabet = "abcdefghijklmnopqrstuvwxyz"

input = sys.stdin.readline

########################################

n = int(input())
arr = list(map(int , input().split()))
ans = 0
for i in range(1,n+1):
	if arr[i-1]&1 and i&1:
		ans+=1
print(ans)
A=input()
B=input()
C=input()

if len(A)=7 and len(B)=5 and len(C)=5 :
	print("YES")
else:
  	print("NO")
  
if len(A)=5 and len(B)=7 and len(C)=5 :
	print("YES")
else:
  	print("NO")
    
if len(A)=5 and len(B)=5 and len(C)=7 :
	print("YES")
else:
  	print("NO")


### FIXED CODE ###

ABC=list(map(int,input().split()))
ABC.sort()

if ABC[0]==5 and ABC[1]==5 and ABC[2]==7:
	print("YES")
else:
	print("NO")
a = list(map(int, input().split()))

print(inya[0]+a[1]/2)

### FIXED CODE ###

a = list(map(int, input().split()))
 
print(int(a[0]+a[1]/2))
n =int(input())
ans = 1
for i in range(int(np.log2(n))):
    ans += 2**(i+1)
    
print(ans)

### FIXED CODE ###

import numpy as np
n =int(input())
ans = 1
for i in range(int(np.log2(n))):
    ans += 2**(i+1)
    
print(ans)
n=input();a=input();b=input();c=input();d=input();e=input()
turn=1
turn+=n//a+1
turn+=n%a//b+1
turn+=n%a%b//c+1
turn+=n%a%b%c//d+1
turn+=n%a%b%c%d//e+1
print(turn)

### FIXED CODE ###

N = int(input())
cnt = int()
A=[]
for i in range(5):
    A.append(int(input()))
A.sort()
print(-(-N//min(A))+4)
import math

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

def main():
    input()
    lcm = 1
    num_list = [int(i) for i in input().split()]
    for i in range(len(num_list)):
        lcm = func(num_list[i], lcm)
    lcm -= 1

    counter = 0
    for i in num_list:
        counter += (lcm % i)
    
    print(counter)

main()

### FIXED CODE ###

def main():
    input()
    lcm = 1
    num_list = [int(i) for i in input().split()]
    for i in range(len(num_list)):
        lcm = num_list[i] * lcm
    lcm -= 1

    counter = 0
    for i in num_list:
        counter += (lcm % i)
    
    print(counter)

main()
a = input();
if (a[0] == a[1] & a[1] == a[2]) print('Yes')
elif (a[1] == a[2] & a[2] == a[3]) print('Yes')
else print('No')


### FIXED CODE ###

a = input();
if ((a[0] == a[1]) & (a[1] == a[2])) : print('Yes')
elif ((a[1] == a[2]) & (a[2] == a[3])) : print('Yes')
else : print('No')
n = int(input())
s = input()
mod = 998244353
ans = 1
z, o, t = n, 0, 0
O, T = "", ""
for i in range(3*n):
  if T != "" and s[i] != O and s[i] != T:
    ans *= t
    ans %= mod
    t -= 1
    if t == 0:
      T = ""
  elif s[i] == O or O == "":
    o += 1
    ans *= zg
    ans %= mod
    z -= 1
    O = s[i]
  else:
    t += 1
    ans *= o
    ans %= mod
    o -= 1
    T = s[i]
    if o == 0:
      O = ""

print(ans)


### FIXED CODE ###

n = int(input())
s = input()
mod = 998244353
ans = 1
z, o, t = n, 0, 0
pre = ["", ["", ""]]
for i in range(3*n):
  if t != 0 and s[i] not in pre[1]:
    ans *= t
    ans %= mod
    t -= 1
    if t == 0:
      pre[1] = ["", ""]
  elif s[i] == pre[0] or o == 0:
    o += 1
    ans *= z
    ans %= mod
    z -= 1
    pre[0] = s[i]
  else:
    t += 1
    ans *= o
    ans %= mod
    o -= 1
    pre[1] = [pre[0], s[i]]
    if o == 0:
      pre[0] = ""

print(ans)