Harryxun/stf_run huggingface dataset:
a, b = map(int, input())
print((a+b)//2 if not (a+b)%2 else "IMPOSSIBLE")

### FIXED CODE ###

a, b = map(int, input().split())
print((a+b)//2 if not (a+b)%2 else "IMPOSSIBLE")
n = int(input())
res = 0
for i in range(n + 1):
  if str(i) % 2 == 1:
    res += 1
print(res0
    

### FIXED CODE ###

n = int(input())
res = 0
for i in range(1, n + 1):
    if len(str(i)) % 2 == 1:
        res += 1
print(res)
from heapq import heappop, heappush

X, Y, Z, K = map(int, input().split())
*A, = map(int, input().split())
*B, = map(int, input().split())
*C, = map(int, input().split())
A.sort(reverse=True)
B.sort(reverse=True)
C.sort(reverse=True)

q = []
visited = set()

a = A[0]
for i,b in enumerate(B):
    for j,c in enumerate(C):
        if not (0,i,j) in visited:
            heappush(q, -(a+b+c))
            visited.add((0,i,j))

b = B[0]
for i,a in enumerate(A):
    for j,c in enumerate(C):
        if not (i,0,j) in visited:
            heappush(q, -(a+b+c))
            visited.add((i,0,j))

c = C[0]
for i,a in enumerate(A):
    for j,b in enumerate(B):
        if not (i,j,0) in visited:
            heappush(q, -(a+b+c))
            visited.add((i,j,0))

for _ in range(K):
    print(-heappop(q))

### FIXED CODE ###

from heapq import heappush, heappop

X, Y, Z, K = map(int, input().split())
*A, = map(int, input().split())
*B, = map(int, input().split())
*C, = map(int, input().split())
A.sort(reverse=True)
B.sort(reverse=True)
C.sort(reverse=True)

# x以上のものがK個あるならOK
def f(x):
    cnt = 0
    for i in A:
        for j in B:
            for k in C:
                if i+j+k<x:break
                cnt += 1
                if cnt>=K:
                    return True
    return False

def get_boarder():
    l, r = 0, A[0]+B[0]+C[0]
    while r-l>1:
        m = (l+r)//2
        if f(m):
            l = m
        else:
            r = m
    return l

boarder = get_boarder()
q = []
for i in A:
    for j in B:
        for k in C:
            if i+j+k<boarder:break
            heappush(q, -(i+j+k))

for _ in range(K):
    print(-heappop(q))
import sys
input = sys.stdin.readline
n = int(input())
s = input()
ans = set()
for i in range(len(s)-2):
  for j in range(i+1,len(s)-1):
    for l in range(j+1,len(s)):
      ans.add(int(s[i])*100+int(s[j])*10+int(s[l]))
print(len(ans))

### FIXED CODE ###

import sys
input = sys.stdin.readline
n = int(input())
s = input()
def multi_index(l,x):
  return tuple([i for i,_x in enumerate(l) if _x == x])

ans = 0
for i in range(10):
  e = 0
  if str(i) in s:
    c = multi_index(s,str(i))[0]
    for j in range(10):
      if str(j) in s and i!=j and c<=len(s)-2:
        for q in range(c+1,len(s)-1):
          if str(j) == s[q]:
            d = q
            break
        else:
          d = -1
      elif str(j) in s and i==j and len(multi_index(s,str(i)))>=2:
        d = multi_index(s,str(i))[1]
      else:
        d = -1
      if d > c:
        for l in range(10):
          if str(l) in s and i!=j and j!=l and i!=l:
            e = multi_index(s,str(l))[-1]
            if e > d:
              ans += 1
          if str(l) in s and i!=j and j==l:
            e = multi_index(s,str(l))[-1]
            if e > d:
              ans += 1
          if str(l) in s and i==j and j!=l:
            e = multi_index(s,str(l))[-1]
            if e > d:
              ans += 1
          if str(l) in s and i==j and j==l:
            e = multi_index(s,str(l))[-1]
            if e > d:
              ans += 1
          if str(l) in s and i==l and j!=l:
            e = multi_index(s,str(l))[-1]
            if e > d:
              ans += 1
print(ans)
n = int(input())
s = list(input())
count = 0
for i in range (1,n):
  if s[i-1] == 'A' and s[i] == 'B' and s [i+1] == 'C':
    count += 1
print(count)

### FIXED CODE ###

n = int(input())
s = str(input())
count = 0
if n % 3 == 1 or n % 3 == 0:
  for i in range(n-1):
    if s[i] == 'A' and s[i+1] == 'B' and s[i+2] == 'C':
      count += 1
elif n % 3 == 2:
  for i in range(n-2):
    if s[i] == 'A' and s[i+1] == 'B' and s[i+2] == 'C':
      count += 1
print(count)
# -*- coding: utf-8 -*-
import sys
from heapq import heappush, heappop, heapify
from collections import defaultdict
import copy
 
N,Q=map(int, sys.stdin.readline().split())
 
S=[]
event=[]
for _ in range(N):
	s,t,x=map(int, sys.stdin.readline().split())
	event.append(  ( s-x ,1, x) )	#Start
	event.append(  ( t-x,-1, x) )	#End


for i in range(Q):
	d=int(sys.stdin.readline().strip())
	event.append(  (d ,0, i) )

event.sort(key=lambda x:(x[0]) )

stop=set()

ans=defaultdict(lambda: -1) 

for s,flag,x in event:
	if flag==1:
		stop.add(x)
	elif flag==-1:
		stop.remove(x)
	elif flag==0:
		if stop:
			ans[x]=min(stop)
		else:
			ans[x]=-1


for i in range(Q):
	print ans[i]


### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right

N,Q=map(int, sys.stdin.readline().split())

S=[]
event=[]	#x, s, t
for _ in range(N):
	s,t,x=map(int, sys.stdin.readline().split())
	heappush( event, (x, max(0,s-x) , max(0,t-1-x)) )


D=[ int(sys.stdin.readline().strip()) for _ in range(Q) ]
D.sort()
ans=[ float("inf") for _ in range(Q) ]

Next=[ i+1 for i in range(Q) ]	#Next


while event:
	x,s,t=heappop(event)
	start=bisect_left(D,s)
	end=bisect_right(D,t)

	i=start
	while i<end:
		ans[i]=min(ans[i],x)
		next=Next[i]
		Next[i]=end
		i=next

for x in ans:
	if x==float("inf"):
		print -1
	else:
		print x
from collections import deque

gx, gy = w-1, h-1

q = deque()
q.appendleft([0,0])
INF = 10**5

dist = [[INF]*w for _ in range(h)]
dist[0][0] = 0

while q:
  x,y = q.pop()
  
  for dx,dy in [[1,0],[0,1],[-1,0],[0,-1]]:
    nx = x+dx
    ny = y+dy
    
    if 0<=nx<w and 0<=ny<h:
      if dist[ny][nx]==INF and maze[ny][nx] != '#':
        dist[ny][nx] = dist[y][x]+1
        q.appendleft([nx,ny])      

black_num = sum([maze[i].count('#') for i in range(h)])
print( h*w - dist[gy][gx] - black_num -1 )

### FIXED CODE ###

from collections import deque

h,w = map(int,input().split())
maze = [input() for _ in range(h)]

gx, gy = w-1, h-1

q = deque()
q.appendleft([0,0])
INF = 10**5

dist = [[INF]*w for _ in range(h)]
dist[0][0] = 0

while q:
  x,y = q.pop()
  
  for dx,dy in [[1,0],[0,1],[-1,0],[0,-1]]:
    nx = x+dx
    ny = y+dy
    
    if 0<=nx<w and 0<=ny<h:
      if dist[ny][nx]==INF and maze[ny][nx] != '#':
        dist[ny][nx] = dist[y][x]+1
        q.appendleft([nx,ny])      

black_num = sum([maze[i].count('#') for i in range(h)])

if dist[gy][gx] == INF:
  print(-1)
else:  
  print( h*w - dist[gy][gx] - black_num -1 )
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools
import copy
import collections
from operator import itemgetter
#以下てんぷら
def j(q):
    if q==1: print("Yes")
    else:print("No")
    exit(0)


def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")

def ip():
    return int(input())
def printrow(a):
    for i in range(len(a)):
        print(a[i])
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
n = ip()                                     #入力整数1つ
#a,b,c= (int(i) for i in input().split())       #入力整数横2つ以上
#a = [int(i) for i in input().split()]        #入力整数配列
a = input()                                  #入力文字列
#a = input().split()                          #入力文字配列
#k = ip()                      #入力セット(整数改行あり)(1/2)
#a=[ip() for i in range(3)]    #入力セット(整数改行あり)(2/2)
#jの変数はしようできないので注意
#全足しにsum変数使用はsum関数使用できないので注意
#こっから本文
p = 0
while a[p] == '.':p+=1
x,y = 0,0
for i in range(p,n):
    if a[i] == '#':x+=1
    else: y+=1
print(min(x,y))

### FIXED CODE ###

from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools
import copy
import collections
from operator import itemgetter
#以下てんぷら
def j(q):
    if q==1: print("Yes")
    else:print("No")
    exit(0)


def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")

def ip():
    return int(input())
def printrow(a):
    for i in range(len(a)):
        print(a[i])
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
n = ip()                                     #入力整数1つ
#a,b,c= (int(i) for i in input().split())       #入力整数横2つ以上
#a = [int(i) for i in input().split()]        #入力整数配列
a = input()                                  #入力文字列
#a = input().split()                          #入力文字配列
#k = ip()                      #入力セット(整数改行あり)(1/2)
#a=[ip() for i in range(3)]    #入力セット(整数改行あり)(2/2)
#jの変数はしようできないので注意
#全足しにsum変数使用はsum関数使用できないので注意
#こっから本文
rb = 0
rw = 0
for i in range(n):
    if a[i] == '#':rb+=1
    else : rw+=1
lb = 0
lw = 0
s = rw
for i in range(n):
    if a[i] == '#':
        lb+=1
        rb-=1
    else :
        lw+=1
        rw-=1
    s = min(s,lb+rw)
print(s)
S,T=input(),input()
s_list,t_list=list(reversed(list(S))),list(reversed(list(T)))
i=0
num=0
count=0
str=''
for i,s in enumerate(s_list):
    if num==len(T):
        end,start=i-1,i-len(T)
        break
    if s=='?' or s==t_list[num]:
        num+=1
        str+=s
    elif len(str)!=len(T):
        num,str=0,''
    if i==len(s_list)-1 and num<len(T):
        print('UNRESTORABLE')
        exit()
s_list[start:end+1]=t_list
print(''.join(s_list).replace('?','a')[::-1])


### FIXED CODE ###

S, T = input(), input()
if len(T) > len(S):
    print('UNRESTORABLE')
    exit()

able_list = []

for i in range(len(S) - len(T) + 1):
    S_part = S[i:len(T) + i]
    for j in range(len(T)):
        if S_part[j] == T[j] or S_part[j] == '?':
            if j == len(T) - 1:
                able_list.append(S[0:i] + T + S[len(T) + i:])
            continue
        else:
            break

if not able_list:
    print('UNRESTORABLE')
    exit()

for i in range(len(able_list)):
    able_list[i] = able_list[i].replace('?', 'a')

able_list.sort()
print(able_list[0])
n,m = map(int,input().split())
s=[0]*m
c=[0]*m
ans=[]
judge=False
for i in range(m):
    s[i],c[i]=map(int,input().split())
for j in range(10**n):
    j=str(j)
    for l in range(m):
        if int(j[s[l]-1])==c[l]:
            pass
        else:
            break
    else:
        ans.append(int(j))
        judge=True
if judge:
    print(min(ans))
else:
    print('-1')

### FIXED CODE ###

N,M=map(int,input().split())
s=[]
c=[]
for i in range(M):
    a,b=map(int,input().split())
    s.append(a)
    c.append(b)
found=False
start=pow(10,N-1)
stop=pow(10,N)
if N==1:
    start=0
for i in range(start,stop):
    i_str=str(i)
    passed=True
    for j in range(M):
        if not i_str[s[j]-1]==str(c[j]):
            passed=False
            break
    if passed:
        found=True
        print(i)
        break
if not found:
    print('-1')
i = 0

while True:
    num = int(input())
    if num == 0:
        break
    print('Case {}': num.format(i, num))
    i++
    


### FIXED CODE ###

i = 1

while True:
    num = int(input())
    if num == 0:
        break
    print('Case {}: {}'.format(i, num))
    i+=1
L = int(input())
ans = L**3
ans = ans / 27
print(ans)

### FIXED CODE ###

N,M = map(int,input().split())
ans = (N*(N-1))//2 + (M*(M-1))//2
print(ans)
c = input()
a = 'abcdefchijklmnopqrstu'
print(a[a.index(c)+1])

### FIXED CODE ###

c = input()
a = 'abcdefghijklmnopqrstuvwxyz'
print(a[a.index(c)+1])
N = int(input())
A = list(map(int, input().split()))
A = [A[i]-(i+1) for i in range(N)]

ans = float("inf")
for b in range(min(A), max(A)+1):
    loss = sum([abs(A[i] - b) for i in range(N)])
    ans = min(ans, loss)


print(ans)


### FIXED CODE ###

N = int(input())

if N % 2 == 0:
    ans = N
else:
    ans = 2 * N


print(ans)
n,x=map(int,input().split())
L = list(map(int,input().split()))
count=0
D=0
for i in range(n):
    if D>x:
        print(count)
        break
    elif D=0:
        count+=1
        print(count)
        break
    else:
        D=D+L[i]     
        count+=1


### FIXED CODE ###

n,x=map(int,input().split())
L = list(map(int,input().split()))
count=1
D=0
for i in L:
    D=D+i
    if D<=x:
        count+=1
    else:
        break
 
print(count)
S=input()
Q=[s for s in S if s != 'A']
U=list('KIHBR')
import sys
if S.count('A')>4:
    print('NO')
    sys.exit()
for i in range(len(S)):
    if S[i] not in list('AKIHABARA'):
        print('NO')
        sys.exit()
for i in range(len(S)-1):
    if S[i]==S[i+1]:
        print('NO')
        sys.exit()
    elif S[i]=='K' and S[i+1]!='I':
        print('NO')
        sys.exit()
    elif S[i]=='I' and S[i+1]!='H':
        print('NO')
        sys.exit()
for i in range(len(U)):
    if Q[i]==U[i]:
        pass
    else:
        print('NO')
        break
else:
    print('YES')

### FIXED CODE ###

S=input()
Q=[s for s in S if s != 'A']
U=list('KIHBR')
import sys
if S.count('A')>4:
    print('NO')
    sys.exit()
elif len(Q)!=5:
    print('NO')
    sys.exit()
for i in range(len(S)):
    if S[i] not in list('AKIHABARA'):
        print('NO')
        sys.exit()
for i in range(len(S)-1):
    if S[i]==S[i+1]:
        print('NO')
        sys.exit()
    elif S[i]=='K' and S[i+1]!='I':
        print('NO')
        sys.exit()
    elif S[i]=='I' and S[i+1]!='H':
        print('NO')
        sys.exit()
for i in range(len(U)):
    if Q[i]==U[i]:
        pass
    else:
        print('NO')
        break
else:
    print('YES')
a,b = map(int(input().split()))
if a < 10 and b < 10:
  print(a * b)
else:
  print(-1)

### FIXED CODE ###

a,b = map(int,input().split())
if a < 10 and b < 10:
  print(a * b)
else:
  print(-1)
N = int(input())
height = []
count = 0
for i in range(N):
  x = int(input())
  height.append(x)
  if max(height) == height[i]:
    count += 1

print(count)

### FIXED CODE ###

N = int(input())
hotel = list(map(int,input().split()))
new =[]

count = 0
for i in hotel:
  new.append(i)
  if i == max(new):
    count += 1
print(count)
n = int(raw_input()) 
G = [0 for i in range(n)] 
a = [[0 for i in range(n)] for j in range(n)]
dis = [10000 for i in range(n)]
dis[0] = 0

for i in range(n):
    G = map(int, raw_input().split())
    for j in range(G[1]):
        a[G[0]-1][G[2+j]-1] = 1
 
def bfs_visit(s):
    for k in range(n):
      if a[s][k] == 1:
        if dis[k] > dis[s] + 1:
          dis[k] = dis[s] + 1
          bfs_visit(k)

for s in range(n):
    bfs_visit(s)
for s in range(n):
    if dis[s] == 10000:
       dis[s] = -1
for s in range(n):
    print (s+1, d[s])

### FIXED CODE ###

n = int(raw_input())
   
dis = [99999 for i in range(n)]
G = [0 for i in range(n)]
v = [[0 for i in range(n)] for j in range(n)]
   
def BFS(s):
  for e in range(n):
    if v[s][e] == 1:
      if dis[e] > dis[s] + 1:
        dis[e] = dis[s]+1
        BFS(e)
   
for i in range(n):
  G = map(int, raw_input().split())
  for j in range(G[1]):
    v[G[0]-1][G[2+j]-1] = 1
   
dis[0] = 0
for s in range(n):
  BFS(s)
for s in range(n):
  if dis[s] == 99999:
    dis[s] = -1
for s in range(n):
  print'{0} {1}'.format(s+1, dis[s])
D = int(input())#D=365
c = list(map(int, input().split()))#0<=c<=100
s = [list(map(int, input().split())) for _ in range(D)]#0<=s<=20000

t = []
for d in range(D):
    t.append(s.index(max(s[d])) + 1)

for i in range(D):
    print(t[i])

### FIXED CODE ###

n=int(input())
for i in range(n):
  print(1)
n, y = map(int,input().split())
y = y//1000
for i in range(n+1):
    for j in range (n+1-i):
        k = n - i - j
        if 10*i + 5* j + 1 * k == y:
            print(str(i) +' '+str(j)+' '+str(k))
            syexit()
print('-1 -1 -1')

### FIXED CODE ###

n, y = map(int,input().split())
y = y//1000
for i in range(n+1):
    for j in range (n+1-i):
        k = n - i - j
        if 10*i + 5* j + 1 * k == y:
            print(str(i) +' '+str(j)+' '+str(k))
            exit()
print('-1 -1 -1')
N = int(input())
S = input()
S_l = S[:N]
S_r = S[N:][::-1]
dict_l = {}
dict_r = {}
ans = 0
for num in range(2**N):
  tmpl_1 = ""
  tmpl_2 = ""
  tmpr_1 = ""
  tmpr_2 = ""
  for n in range(N):
    if (num >> (N-1-n) & 1):
      tmpl_1 += S_l[n]
      tmpr_1 += S_r[n]
    else:
      tmpl_2 += S_l[n]
      tmpr_2 += S_r[n]
  dict_l[[tmpl_1,tmpl_2]] = dict_l.get([tmpl_1,tmpl_2], 0) + 1
  dict_r[[tmpr_1,tmpr_2]] = dict_r.get([tmpr_1,tmpr_2], 0) + 1
for k, v in dict_l.items():
  ans += v*dict_r.get(k,0)
print(ans)


### FIXED CODE ###

N = int(input())
S = input()
S_l = S[:N]
S_r = S[N:][::-1]
dict_l = {}
dict_r = {}
ans = 0
for num in range(2**N):
  tmpl_1 = ""
  tmpl_2 = ""
  tmpr_1 = ""
  tmpr_2 = ""
  for n in range(N):
    if (num >> (N-1-n) & 1):
      tmpl_1 += S_l[n]
      tmpr_1 += S_r[n]
    else:
      tmpl_2 += S_l[n]
      tmpr_2 += S_r[n]
  dict_l[tmpl_1+"_"+tmpl_2] = dict_l.get(tmpl_1+"_"+tmpl_2, 0) + 1
  dict_r[tmpr_1+"_"+tmpr_2] = dict_r.get(tmpr_1+"_"+tmpr_2, 0) + 1
for k, v in dict_l.items():
  ans += v*dict_r.get(k,0)
print(ans)
import math

def main():
  N, X, T = input().split(' ')
  t = math.ceil(N/X) * T
  print(t)
 
if __name__=="__main__":
  main()

### FIXED CODE ###

import math

def main():
  N, X, T = [int(i) for i in input().split(' ')]
  t = math.ceil(N/X) * T
  print(t)
 
if __name__=="__main__":
  main()
import sys
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 II(): return int(sys.stdin.readline())
def SI(): return int(input())
from collections import defaultdict
import bisect

sys.setrecursionlimit(1000000000)

n = SI()
a_list = LI()

a_list =  sorted(a_list)
minus = bisect.bisect_left(a_list, 0)
minus_list = a_list[:minus]

plus_list = a_list[minus:]

ans = 0
p_i = 0
m_i = 0
if minus == 0:
    print(sum(plus_list) - 2*plus_list[0])
    minus_list = plus_list[0:1]
    plus_list = plus_list[1:]


elif minus == n:
    print(-sum(minus_list) + 2*minus_list[-1])
    plus_list = minus_list[-1:]
    minus_list = minus_list[:-1]

else:
    print(sum(plus_list) - sum(minus_list))

ans = minus_list[m_i]
m_i += 1
minus = len(minus_list)
plus = len(plus_list)


while p_i != (plus-1):
    print(ans, plus_list[p_i])
    ans = ans - plus_list[minus]
    p_i += 1

print(plus_list[p_i], ans)
ans = plus_list[p_i] - ans

while m_i != minus:
    print(ans, minus_list[m_i])
    ans = ans - minus_list[m_i]
    m_i += 1


### FIXED CODE ###

import sys
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 II(): return int(sys.stdin.readline())
def SI(): return int(input())
from collections import defaultdict
import bisect

sys.setrecursionlimit(1000000000)

n = SI()
a_list = LI()

a_list =  sorted(a_list)
minus = bisect.bisect_left(a_list, 0)
minus_list = a_list[:minus]

plus_list = a_list[minus:]

ans = 0
p_i = 0
m_i = 0
if minus == 0:
    print(sum(plus_list) - 2*plus_list[0])
    minus_list = plus_list[0:1]
    plus_list = plus_list[1:]


elif minus == n:
    print(-sum(minus_list) + 2*minus_list[-1])
    plus_list = minus_list[-1:]
    minus_list = minus_list[:-1]

else:
    print(sum(plus_list) - sum(minus_list))

ans = minus_list[m_i]
m_i += 1
minus = len(minus_list)
plus = len(plus_list)


while p_i != (plus-1):
    print(ans, plus_list[p_i])
    ans = ans - plus_list[p_i]
    p_i += 1

print(plus_list[p_i], ans)
ans = plus_list[p_i] - ans

while m_i != minus:
    print(ans, minus_list[m_i])
    ans = ans - minus_list[m_i]
    m_i += 1
string s = input()

count = 0

if (s[0] == '1'):
    count++
if (s[1] == '1'):
    count++
if (s[2] == '1'):
    count++

print(count)


### FIXED CODE ###

print(input().count("1"))
N = input()
s = 0
for n in N:
  s += int(n)
res = int(N) % s
if res == 0:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

num = 0
s = input()
for op in s:
  if op == '+':
    num += 1
  else:
    num -= 1
print(num)
k, a, b = map(int, raw_input().split())
if a >= b:
    print(res)
    exit()

res = k
k -= a-1
if k >= 0:res = max(res, a + (k / 2) * (b-a))
k -= 1
if k >= 0:res = max(res, a + 1 + (k / 2) * (b-a))
print res


### FIXED CODE ###

k, a, b = map(int, raw_input().split())
res = k+1
if a >= b:
    print(res)
    exit()

k -= a-1
if k >= 0:res = max(res, a + (k / 2) * (b-a))
k -= 1
if k >= 0:res = max(res, a + 1 + (k / 2) * (b-a))
print res
w=list(input())
ans=sorted(w)

while ans[-1]==ans[-2]:
  del ans[-2:]
  if len(ans)==0 or len(ans)==1:
    break

if len(ans)==0:
  print('Yes')
else:
  print('No')




### FIXED CODE ###

w=list(input())
ans=sorted(w)

if len(ans)>1:
  while ans[-1]==ans[-2]:
    del ans[-2:]
    if len(ans)==0 or len(ans)==1:
      break

if len(ans)==0:
  print('Yes')
else:
  print('No')
a=input()
b=input()
x=[0 for _ in range(3)]
x[a-1]=1
x[b-1]=1
for i in range(3):
  if x[i]==0:
    print(i+1)
    break


### FIXED CODE ###

a=int(input())
b=int(input())
x=[0 for _ in range(3)]
x[a-1]=1
x[b-1]=1
for i in range(3):
  if x[i]==0:
    print(i+1)
    break
//g++ -std=gnu++14 a.cpp

#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <tuple>
#include <iomanip>
#include <random>
#include <math.h>
#include <stdio.h>

using namespace std;

#define ll long long
#define rep(i, n) for(ll i = 0; i < (n); i++)
ll MOD = 1e9 + 7;
int INF = 1 << 30;
ll INFL = 1LL << 60;
ll MODP = 998244353;

void dfs(int x,vector<vector<int>> &v,vector<int> &g, int &num){
  int x_size = v[x].size();
  if(x > 0){
    rep(i,x_size){
      if(g[v[x][i]] == 0){
        g[v[x][i]] = num;
        dfs(v[x][i],v,g,num);
      }
    }
  }
}

int main(){
  int N,M;
  cin >> N >> M;
  vector<int> A(M),B(M),group(N+10,0);
  rep(i,M)cin >> A[i] >> B[i];
  vector<vector<int>> G(N+10);
  rep(i,M){
    G[A[i]].push_back(B[i]);
    G[B[i]].push_back(A[i]);
  }
  int num = 1;
  for(int i = 1;i <= N;i++){
    if(group[i] == 0){
      group[i] = num;
      dfs(i,G,group,num);
      num++;
    }
  }
  vector<int> cnt(N+10,0);
  for(int i = 1;i <= N;i++){
    cnt[group[i]]++;
  }
  int ans = -1;
  for(int i = 1;i <= N;i++){
    if(ans < cnt[i])ans = cnt[i];
  }
  cout << ans << endl;
/*
  for(int i = 1;i <= N;i++){
    cout << group[i] << " ";
  }
  cout << endl;
  for(int i = 1;i <= N;i++){
    cout << G[i].size() << " ";
  }
  cout << endl;
*/
  return 0;
}


### FIXED CODE ###

n = int(input())

s = input().split(" ")

sumup = 0
for i in s:
  sumup += int(i) 

ans = 0
for i in s:
  r = int(i)
  
  sumup -= r
  
  ans += r*sumup
    
print(ans%(10**9+7))
s=list(input())
n=len(s)
l=[]
i=0
while i<n:
    if i<n-1 and l[i]=='B' and l[i+1]=='C':
        l.append('D')
        i+=2
    else:
        l.append(l[i])
        i+=1
n=len(l)
ans=0
r=[0]*(n+1)
f=0
for i in range(n-1,-1,-1):
    if l[i]=='D':
        f+=1
    elif l[i]=='A':
        ans+=f
    else:
        f=0
print(ans)


### FIXED CODE ###

s=list(input())
n=len(s)
l=[]
i=0
while i<n:
    if i<n-1 and s[i]=='B' and s[i+1]=='C':
        l.append('D')
        i+=2
    else:
        l.append(s[i])
        i+=1
n=len(l)
ans=0
r=[0]*(n+1)
f=0
for i in range(n-1,-1,-1):
    if l[i]=='D':
        f+=1
    elif l[i]=='A':
        ans+=f
    else:
        f=0
print(ans)