Harryxun/stf_run huggingface dataset:
def main():
	a,b,c = [int(x) for x in input().split()]
	a, b = b, a
	a, c = c, a
    print(a, b, c)

main()

### FIXED CODE ###

def main():
	a,b,c = [int(x) for x in input().split()]
	a, b = b, a
	a, c = c, a
	print(a, b, c)
    
main()
a,b,c=map(int.input().split())
if a==b:
  if a==c:
    print("No")
  else:
    print("Yes")
elif a==c:
  print("Yes")
elif b==c:
  prunt("Yes")
else:
  print("No")

### FIXED CODE ###

a,b,c=map(int,input().split())
if a==b:
  if a==c:
    print("No")
  else:
    print("Yes")
elif a==c:
  print("Yes")
elif b==c:
  print("Yes")
else:
  print("No")
#!/usr/bin python3
# -*- coding: utf-8 -*-

from fractions import gcd   #for python3.4
from math import gcd        #for python3.8

def lcm(a,b):
    G = gcd(a, b) #最大公約数
    L = (a//G)*b #最小公倍数
    return L

def main():
    N, M = map(int, input().split())
    S = input()
    T = input()
    L = lcm(N,M)
    if S[::L//M]==T[::L//N]:
        print(L)
    else:
        print(-1)

if __name__ == '__main__':
    main()

### FIXED CODE ###

#!/usr/bin python3
# -*- coding: utf-8 -*-

from fractions import gcd   #for python3.4
#from math import gcd        #for python3.8

def lcm(a,b):
    G = gcd(a, b) #最大公約数
    L = (a//G)*b #最小公倍数
    return L

def main():
    N, M = map(int, input().split())
    S = input()
    T = input()
    L = lcm(N,M)
    if S[::L//M]==T[::L//N]:
        print(L)
    else:
        print(-1)

if __name__ == '__main__':
    main()
b = str(input())

if b = A:
	print("T")
elif b = T:
	print("A")
if b = C:
	print("G")
elif b = G:
	print("C")

### FIXED CODE ###

b = str(input())

if b == "A" :
	print("T")
elif b == "T" :
	print("A")
elif b == "C" :
	print("G")
elif b == "G" :
	print("C")
n = int(input())
a = list(map(int, input().split()))

if 0 in a:
  print(0)
  exit()

ans = 1
for i in a:
  ans *= a

if ans > 10**18:
  print(-1)
else:
  print(ans)

### FIXED CODE ###

n=int(input())
arr=list(map(int,input().split()))
arr=sorted(arr) 
ans=1
for val in arr:
 ans*=val 
 if ans>10**18:
   print(-1)
   break
else:
 print(ans)
import math
from functools import reduce

def main():
    n,m=map(int,input().split())
    a=list(map(int,input().split()))

    for i,aa in enumerate(a):
        a[i] = aa//2
    tmp = lcm(*a)
    # print(tmp)
    cnt =0
    # print(a)

    up = m//tmp
    if up % 2 == 0:
        up = up//2
    else:
        up = up//2 + 1

    nowtmp = tmp
    cnt = 0
    ans = 0
    a.sort()
    # print(nowtmp)
    # print(up)
    before = 0
    before_aa = 0
    for i, aa in enumerate(a):
        if before_aa == aa:
            continue
        if aa == 1:
            print(up)
            return
        if aa <= nowtmp and aa>before:
            cnt += 1

        elif aa> nowtmp :
            ans += cnt * up
            up -=1
            cnt = 0
            nowtmp += tmp
            before += tmp
    ans += cnt * up
    print(ans)

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

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
if __name__=='__main__':
    main()


### FIXED CODE ###

import fractions
from functools import reduce

def main():
    n,m=map(int,input().split())
    a=list(map(int,input().split()))
    
    for i,aa in enumerate(a):
        j = 0

        while aa % 2 == 0:
            aa //= 2
            j+=1
        if i == 0:
            modtmp = j
        else:
            if modtmp != j:
                print(0)
                return

    for i,aa in enumerate(a):
        a[i] = aa//2
    tmp = lcm(*a)
    # print(tmp)
    cnt =0
    # print(a)

    up = m//tmp
    if up % 2 == 0:
        up = up//2
    else:
        up = up//2 + 1

    nowtmp = tmp
    cnt = 0
    ans = 0
    a.sort()
    # print(nowtmp)
    # print(up)
    before = 0
    before_aa = 0
    print(up)
    return
    for i, aa in enumerate(a):
        if before_aa == aa:
            continue
        if aa == 1:
            print(up)
            return
        if aa <= nowtmp and aa>before:
            cnt += 1

        elif aa> nowtmp :
            ans += cnt * up
            up -=1
            cnt = 0
            nowtmp += tmp
            before += tmp
    ans += cnt * up
    print(ans)

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

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
if __name__=='__main__':
    main()
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return r'\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

n,m=map(int,input().split())
a=[None]*m
b=a[:]
ans=0
for i in range(m):
  a[i],b[i]=map(lambda x:x-1,map(int,input().split()))
for i in range(m):
  u=UnionFind(n)
  for j in range(i):
    if j!=i:
      u.union(a,b)
  if u.size(0)!=n:
    ans+=1
print(ans)

### FIXED CODE ###

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return r'\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

n,m=map(int,input().split())
a=[None]*m
b=a[:]
ans=0
for i in range(m):
  a[i],b[i]=map(lambda x:x-1,map(int,input().split()))
for i in range(m):
  u=UnionFind(n)
  for j in range(m):
    if j!=i:
      u.union(a[j],b[j])
  if u.size(0)!=n:
    ans+=1
print(ans)
N, M = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(N)]

for i in range(len(AB)):
  if AB[i][0] > M:
    AB.pop(i)

AB.sort(reverse = True, key = lambda x:x[1])
ans = 0
for i in range(1, M + 1):
  for j in range(len(AB)):
    if AB[j][0] <= i:
      ans += AB.pop(j)[1]
      break

print(ans)

### FIXED CODE ###

from heapq import heappush, heappop

N, M = map(int, input().split())
jobs = [[] for _ in range(M)]

for i in range(N):
  ab = list(map(int, input().split()))
  #Ai > M の仕事はいらない
  if ab[0] <= M:
    jobs[ab[0] - 1].append(ab[1])

#最終日はAi=1の仕事のみ選べる。その前の日はAi<=2, ...
#終わりから考えればよさそう
hq = []
ans = 0
for i in range(M):
  for b in jobs[i]:
    heappush(hq, -1 * b)
  if len(hq) > 0:
    m = -1 * heappop(hq)
    ans += m

print(ans)
N,M = map(int,input().rstrip().split(" "))
ans = [[False for _ in range(N)] for _ in range(N)]

if N % 2 == 1:
    for i in range(1,M + 1):
        print(str(i) + " " + str(N - i))
else:
    for i in range(1,min(M + 1,(N - 1) / 2)):
        print(str(i) + " " + str(N - i))
    if (N - 1) // 2 == M:
        print(str(N / 2) + " " + str(N / 2 + 1))

### FIXED CODE ###

N,M = map(int,input().rstrip().split(" "))
ans = []
K = (N - 1) // 2
if K % 2 == 0:
    for i in range(K // 2):
        ans.append([K // 2 - i,K // 2 + i + 1])
    for i in range(K // 2):
        ans.append([N - K // 2 -1  - i,N - K // 2 + i + 1])
else:
    for i in range(K // 2 + 1):
        ans.append([K // 2 + 1 - i,K // 2 + i + 2])
    for i in range(K // 2):
        ans.append([N - K // 2 - 1  - i,N - K // 2 + i + 1])
for i in range(M):
    print(str(ans[i][0]) + " " + str(ans[i][1]))
N,K = map(int,input().split())
S = set()

for n in range(N):
  input()
  S|=set(input().split())

print(N-len(S))

### FIXED CODE ###

N,K = map(int,input().split())
S = set()

for k in range(K):
  input()
  S|=set(input().split())

print(N-len(S))
import math

N = int(input())
a = list(map(int, input().split()))
avg = round(sum(a)/len(a))
sums = []
for i in range(1, avg+1):
    s = 0
    for j in range(N):
        s += (a[j]-avg)**2
    sums.append(s)
print(min(sums))

### FIXED CODE ###

N = int(input())
a = list(map(int, input().split()))
avg = round(sum(a)/N)
sums = []
for i in range(min(a), avg+1):
    s = 0
    for j in range(N):
        s += (i-a[j])**2
    sums.append(s)
print(min(sums))
def bitcount(N):  # 立ってるbitの数
    bitcnt = [0]
    for _ in range(N):
        bitcnt += [i + 1 for i in bitcnt]
    return bitcnt


n, x = int(input()), input()

num, cnt = int(x, 2), x.count('1')
lbit = bitcount(18)
for i in range(n):
    ans = 1
    if x[i] == '0':
        ctmp = cnt + 1
        tmp = num % ctmp + pow(2, n - (i + 1), ctmp)
    elif x[i] == '1':
        ctmp = cnt - 1
        tmp = num % ctmp - pow(2, n - (i + 1), ctmp)
    tmp %= ctmp
    ctmp = lbit[tmp]
    while tmp > 0:
        ans += 1
        tmp %= ctmp
        ctmp = lbit[tmp]
    print(ans)


### FIXED CODE ###

def bitcount(N):  # 立ってるbitの数
    bitcnt = [0]
    for _ in range(N):
        bitcnt += [i + 1 for i in bitcnt]
    return bitcnt


n, x = int(input()), input()

num, cnt = int(x, 2), x.count('1')
lbit = bitcount(18)
for i in range(n):
    ans = 1
    if x[i] == '0':
        ctmp = cnt + 1
        tmp = num % ctmp + pow(2, n - (i + 1), ctmp)
    elif x[i] == '1':
        ctmp = cnt - 1
        if ctmp == 0:
            print(0)
            continue
        tmp = num % ctmp - pow(2, n - (i + 1), ctmp)
    tmp %= ctmp
    ctmp = lbit[tmp]
    while tmp > 0:
        ans += 1
        tmp %= ctmp
        ctmp = lbit[tmp]
    print(ans)
A=[0 for i in range(2)]
A=(int,input().split())
n=A[0]
m=A[1]
max=[]
k=0

while n>0 and m>0:
    B=[0 for i in range(n)]
    B=input().split()
    for i in range(n):
        B[i]=int(B[i])
    ma=0
    for i in range(n):
        for j in range(i+1,n):  
            x=0 
            x=B[i]+B[j]
            if ma<x and x<=m:
                ma=x
    max.append(ma)
    A=input().split()
    n=int(A[0])
    m=int(A[1])
    k+=1
for i in range(k):
    if max[i]>0:
        print(max[i])
    else:
        print("NONE")


### FIXED CODE ###

A=[0 for i in range(2)]
A=input().split()
n=int(A[0])
m=int(A[1])
max=[]
k=0

while n>0 and m>0:
    B=[0 for i in range(n)]
    B=input().split()
    for i in range(n):
        B[i]=int(B[i])
    max1=0
    for i in range(n):
        for j in range(i+1,n):  
            x=0 
            x=B[i]+B[j]
            if max1<x and x<=m:
                max1=x
    max.append(max1)
    A=input().split()
    n=int(A[0])
    m=int(A[1])
    k+=1
for i in range(k):
    if max[i]>0:
        print(max[i])
    else:
        print("NONE")
s = input()
t = input()
n, m = len(s), len(t)
dp = [[0]*(m+1) for _ in range(n+1)]

for i in range(1, n+1):
    for j in range(1, m+1):
        if s[i] == t[j]:
            dp[i][j] = dp[i-1][j-1] + 1
        else:
            dp[i][j] = max(dp[i-1][j], dp[i][j-1])

i, j = n, m

ans = []

while i > 0 and j > 0:
    if dp[i][j] == dp[i][j-1]:
        j -= 1
    elif dp[i][j] == dp[i-1][j]:
        i -= 1
    else:
        ans.append(s[i])
        i -= 1
        j -= 1

print(reversed(ans))

### FIXED CODE ###

s = input()
t = input()
n, m = len(s), len(t)
dp = [[0]*(m+1) for _ in range(n+1)]

for i in range(1, n+1):
    for j in range(1, m+1):
        if s[i-1] == t[j-1]:
            dp[i][j] = dp[i-1][j-1] + 1
        else:
            dp[i][j] = max(dp[i-1][j], dp[i][j-1])

i, j = n, m

ans = []

while i > 0 and j > 0:
    if dp[i][j] == dp[i][j-1]:
        j -= 1
    elif dp[i][j] == dp[i-1][j]:
        i -= 1
    else:
        ans.append(s[i-1])
        i -= 1
        j -= 1

print("".join(reversed(ans)))
S = input()
sl = list(S)
N = len(sl)
flag = 0
a = int((N-1)/2)
b = int((N+3)/2)
slr = list(reversed(sl))
asl = sl[0:a]
aslr = list(reversed(asl))
bsl = sl[b:N]
bslr = list(reversed(bsl))
for i in range(N-1):
  if sl[i] != slr[i]:
    flag += 1
for i in range(0,a-1):
  if asl[i] != aslr[i]:
    flag += 1
for i in range(b-1,N-3):
  if bsl[i] != bslr[i]:
    flag += 1
if flag == 0:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

#!/usr/bin/python3
# -*- coding: utf-8 -*-
s = input()
n = len(s)
m = (n-1) // 2
k = (n+3) // 2
flag = 1
for i in range(0, n//2):
    if s[i] != s[n-i-1]:
        flag = 0
        break
for i in range(0, m//2):
    if s[i] != s[m-i-1]:
        flag = 0
        break
for i in range(0, (n-k)//2+1):
    if s[i+k-1] != s[n-i-1]:
        flag = 0
        break
if flag == 1:
    print("Yes")
else:
    print("No")
S = input()
N = len(str(S))
temp = S[0:(N-1)/2]
temp2 = S[(N+2)/2:N]
print("Yes") if temp == temp[::-1] and temp2 == temp2[::-1] else "No"

### FIXED CODE ###

from functools import reduce
def permu(n,r):
    return reduce(lambda a,b: a*b, range(n-r+1,n+1))
N,M = map(int, input().split())
print(int((permu(N,2)+permu(M,2))/2))
books1= list(map(int, input().split()))
i=0
while(i<len(books)):
  if(books[i]==0):
    print(i)
    break
    i+=1

### FIXED CODE ###

books1= list(map(int, input().split()))
i=0
while(i<len(books1)):
  if(books1[i]==0):
    break
  i+=1
print(i+1)
H,W = map(int,input().split())
Grid = [[1 if g == "." else 0 for g in input()] for _ in range(H)]
dp = [[10**9]*(W) for _ in range(H)]
dp[0][0] = 0
black = 0

for g in Grid:
    for gg in g:
        if not(gg):
            black += 1

a = [-1,1]
def bfs(grid,h,w,Q):
    if h == H - 1 and w == W - 1:
        return dp[h][w]
    for aa in a:
        if 0 <= h + aa <= H -1:
            if grid[h+aa][w]:
                grid[h+aa][w] = 0
                dp[h+aa][w] = dp[h][w] + 1
                Q.append([h+aa,w])
        if 0 <= w + aa <= W - 1:
            if grid[h][w+aa]:
                grid[h][w+aa] = 0
                dp[h][w+aa] = dp[h][w] + 1
                Q.append([h,w + aa])
    if len(Q) == 0:
        return -1
    else:
        nexth,nextw = Q.pop(0)
        return bfs(grid,nexth,nextw,Q)
queue = []
if Grid[0][0]:
    print(H*W - bfs(Grid,0,0,queue) - 1 - black)
else:
    print(-1)


### FIXED CODE ###

H,W = map(int,input().split())
Grid = [[1 if g == "." else 0 for g in input()] for _ in range(H)]
dp = [[10**5]*(W) for _ in range(H)]
dp[0][0] = 0
black = 0
flag = Grid[0][0]

for g in Grid:
    for gg in g:
        if not(gg):
            black += 1

a = [-1,1]

import sys
sys.setrecursionlimit(10**4)
def bfs(grid,h,w,Q):
    if h == H - 1 and w == W - 1:
        return dp[h][w]
    for aa in a:
        if 0 <= h + aa <= H -1:
            if grid[h+aa][w]:
                grid[h+aa][w] = 0
                dp[h+aa][w] = dp[h][w] + 1
                Q.append([h+aa,w])
        if 0 <= w + aa <= W - 1:
            if grid[h][w+aa]:
                grid[h][w+aa] = 0
                dp[h][w+aa] = dp[h][w] + 1
                Q.append([h,w + aa])
    if len(Q) == 0:
        return -1
    else:
        nexth,nextw = Q.pop(0)
        return bfs(grid,nexth,nextw,Q)
queue = []
Grid[0][0] = 0
if  flag:
    ans = bfs(Grid,0,0,queue)
    if ans == -1:
        print(-1)
    else:
        print(H*W - ans - 1 - black)
else:
    print(-1)
import math

def lcm(a):
    x = a[0]
    for i in range(1, len(a)):
        x = x * a[i] // math.gcd(x, a[i])
    return x

n = int(input())
t = [int(input()) for _ in range(n)]
print(lcm(t))

### FIXED CODE ###

def gcd(a, b):
    if a < b:
        a, b = b, a
    while a % b != 0:
        a, b = b, a % b
    return b

def lcm(a):
    x = a[0]
    for i in range(1, len(a)):
        x = x * a[i] // gcd(x, a[i])
    return x

n = int(input())
t = [int(input()) for _ in range(n)]
print(lcm(t))
import numpy as np
N, K = map(int, input().split())
P = list(map(int, input().split()))

kitai = [None]*(1001)
for i in range(1, 1001):
    kitai[i] = (0.5*i*(i+1))/i

ruiseki = [None]*(N-K+1)
for i in range(0, N-K+1):
    ruiseki[i] = sum(P[i:i+K])

ind = np.array(ruiseki).argmax()
temp = P[ind:ind+K]
ans = 0
for t in temp:
    ans+=kitai[t]
print(ans)


### FIXED CODE ###

import numpy as np
N, K = map(int, input().split())
P = list(map(int, input().split()))

kitai = [None]*(1001)
for i in range(1, 1001):
    kitai[i] = (0.5*i*(i+1))/i

ruiseki = P.copy()
ruiseki[K-1] = sum(ruiseki[0:K])
for i in range(K, N):
    ruiseki[i] = ruiseki[i-1]+P[i]-P[i-K]

ind = np.array(ruiseki).argmax()
temp = P[ind-K+1:ind+1]
ans = 0
for t in temp:
    ans+=kitai[t]
print(ans)
N=int(input())
list_A=[int(A) for A in input().split()]
list_A.insert(0,0)
list_A.insert(N+1,0)
money=0
for i in range(N+1):
  money+=abs(list_A[i+1]-list_B[i])
for i in range(1,N+1):
  Money=money-abs(list_A[i]-list_A[i-1])-abs(list_A[i+1]-list_A[i])+abs(list_A[i+1]-list_A[i-1])
  print(Money)
    

### FIXED CODE ###

A=int(input())
B=int(input())
C=int(input())
D=int(input())
if A<=B:
  min1=A
else:
  min1=B
if C<=D:
  min2=C
else:
  min2=D
  
print(min1+min2)
N = int(input())
price = []
p = 0
for i in range(N):
  price.append(int(input())
m = price.index(max(price))
for j in range(len(price)):
  if j != m:
     p += price[j]
  else:
     p += price[j]//2
print(p)

### FIXED CODE ###

N = int(input())
price = []
p = 0
for i in range(N):
  price.append(int(input()))
m = price.index(max(price))
for j in range(len(price)):
  if j != m:
     p += price[j]
  else:
     p += price[j]//2
print(p)
import sys
import re
import math
import collections
import decimal
import bisect
import itertools

# import copy
# import heapq
# from collections import deque
# import decimal

# sys.setrecursionlimit(100001)
INF = sys.maxsize
# MOD = 10 ** 9 + 7

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))


# ===CODE===


def main():
    n = ni()
    d = na()
    c = collections.Counter(d)
    nCr = {}

    def cmb(n, r):
        if r == 0 or r == n: return 1
        if n < r: return 0
        if r == 1: return n
        if (n, r) in nCr: return nCr[(n, r)]
        nCr[(n, r)] = cmb(n - 1, r) + cmb(n - 1, r - 1)
        return nCr[(n, r)]

    total = 0
    for v in c.values():
        total += cmb(v, 2)

    for i in range(n):
        v = c[d[i]]
        tmp1 = cmb(v, 2) - cmb(v-1, 2)

        print(int(total - tmp1))


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
import re
import math
import collections
import decimal
import bisect
import itertools

# import copy
# import heapq
# from collections import deque
# import decimal

# sys.setrecursionlimit(100001)
INF = sys.maxsize
# MOD = 10 ** 9 + 7

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))


# ===CODE===


def main():
    n = ni()
    d = na()
    c = collections.Counter(d)

    total = 0
    for v in c.values():
        total += v * (v - 1) // 2

    for i in range(n):
        v = c[d[i]]

        print(int(total - v + 1))


if __name__ == '__main__':
    main()
N = input()
sum = 0
for i in range(N):
  sum+= i*(1+N//i)(N//2)/2
print(sum)

### FIXED CODE ###

N = int(input())
sum = 0
for i in range(1,N+1):
  sum+=i*(1+N//i)*(N//i)/2
print(int(sum))
#!/usr/bin/python                                                                                                                                 
# -*- coding: utf-8 -*-                                                                                                                           

import sys


def main():
    station = ""
    for c in range(ord('a'), ord('z') + 1):
        station += chr(c)
    for c in range(ord('A'), ord('Z') + 1):
        station += chr(c)

    while True:
        n = int(sys.stdin.readline())
        if n == 0:
            break

        l = sys.stdin.readline()
        l = map(lambda x: int(x), l.split())

        s = sys.stdin.readline().rstrip()
        res = ""
        for i, x in enumerate(s):
            index = ord(x) - (ord('a') if x.islower() else ord('A') + 26) - l[i % len(l)]
            res += station[index]
        print res

if __name__ == '__main__':
    main()

### FIXED CODE ###

#!/usr/bin/python                                                                                                                                 
# -*- coding: utf-8 -*-                                                                                                                           

import sys


def main():
    station = ""
    for c in range(ord('a'), ord('z') + 1):
        station += chr(c)
    for c in range(ord('A'), ord('Z') + 1):
        station += chr(c)

    while True:
        n = int(sys.stdin.readline())
        if n == 0:
            return 0

        l = sys.stdin.readline()
        l = map(lambda x: int(x), l.split())

        s = sys.stdin.readline().rstrip()
        res = ""
        for i, x in enumerate(s):
            index = ord(x) - (ord('a') if x.islower() else ord('A') + 26) - l[i % len(l)]
            index %= len(station)
            res += station[index]
        print res

if __name__ == '__main__':
    main()
n = int(input())
h = list(map(int, input().split()))

def dp(n):
    if n == 0:
        return 0
    if n == 1:
        return abs(h[1] - h[0])
    return min(dp(n-1) + abs(h[n] - h[n-1]), dp(n-2) + abs(h[n] - h[n-2]))

print(dp(n-1))

### FIXED CODE ###

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

dp = [float('inf')] * N
dp[0] = 0
dp[1] = abs(h[1] - h[0])

for i in range(2, N):
    dp[i] = min(abs(h[i] - h[i-1]) + dp[i-1], abs(h[i] - h[i-2]) + dp[i-2])

print(dp[-1])
inf = 2019
L, R = map(int, input().split())
ans = 2018
L = L % 2019
R = R % 2019
if L >= R:
    print(0)
    sys.exit
for i in range(L, R):
    if i > R:
      break
      
    for j in range(i + 1, R + 1):
        tmp = int((i * j) % inf)
        ans = min(ans, tmp)
        
print(ans)


### FIXED CODE ###

inf = 2019
L, R = map(int, input().split())
ans = 0
df = R - L
if df < 2019:
    L = L % inf
    R = L + df
    ans = 2019
    for i in range(L, R):
        for j in range(i + 1, R + 1):
            tmp = int((i * j) % inf)
            ans = min(ans, tmp)

print(ans)
N=int(input())
p=list(map(int,intput().split()))
sum=0
for i in range(N):
    sum+=p[i]
print(sum-(max(p)//2))


### FIXED CODE ###

N=int(input())
p=[int(input()) for i in range(N)]
print(sum(p)-max(p)//2)
N = int(input())
H = list(map(int, input().split()))
count = 0
if(N==1):
    print("Yes")
else:
    for i in range(N-1):
        if(H[i+1]-H[i]==-1):
            count +=1
            if(count==1):
                H[i]=H[i]-1
        elif(H[i]>H[i+1]):
            count +=1
    print(count)
    if(count<=1):
        print("Yes")
    else:
        print("No")


### FIXED CODE ###

a, b, c= (int(i) for i in input().split())  

cap=a-b
c=c-cap
if(c>0):
    print(c)
else:
    print("0")
S =int(input())
T=int(input())

print((S-1)*(T-1))

### FIXED CODE ###

li=list(map(int, input().split()))
print((li[0]-1)*(li[1]-1))