Harryxun/stf_run huggingface dataset:
K = input()
S = input()
count = 0

for x in range(K+1):
  for y in range(K+1):
    z = S - x - y
    if 0 <= z and z <= K:
    	count += 1
        
print(count)

### FIXED CODE ###

K, S = map(int, input().split())
count = 0
 
for x in range(K+1):
  for y in range(K+1):
    z = S - x - y
    if 0 <= z and z <= K:
    	count += 1
print(count)
def get_quad(n, p):
    for ni in range(n,0,-1):
        if p[ni] and p[ni - 2] and p[ni - 6] and p[ni - 8]:
            return ni
        
def sieve():
    n = 10000001
    p = [1] * n
    p[0] = p[1] = 0
    
    for i in range(int(n ** 0.5)):
        if p[i]:
            for j in range(2 * i, len(p), i):
                p[j] = 0
    return p
import sys
f = sys.stdin

prime = sieve()
while True:
    ni = int(f.readline())
    if ni == 0:
        break
    print(get_quad(ni, prime))

### FIXED CODE ###

def get_quad(n, p):
    if n < 19:
        return 13
    n = (n + 1) // 10 * 10 - 1
    for ni in range(n,0,-10):
        if p[ni] and p[ni - 2] and p[ni - 6] and p[ni - 8]:
            return ni
        
def sieve():
    n = 10000001
    p = [1] * n
    p[0] = p[1] = 0
    
    for i in range(int(n ** 0.5)):
        if p[i]:
            for j in range(2 * i, len(p), i):
                p[j] = 0
    return p

import sys
f = sys.stdin

prime = sieve()
while True:
    n = f.readline().strip()
    if not n.isdigit():
        continue
    n = int(n)
    if n == 0:
        break
    print(get_quad(n, prime))
S=list(input())
K=int(input())

S_=set([])
for s in tqdm.tqdm_notebook(range(len(S))):
    s_temp=S[s]
    S_.add(s_temp)
    S_temp_list=[s_temp,'']
    for e in range(s+1,len(S)):
        if e-s > K+2:
            break
        S_temp_list[1]=S[e]
        s_temp=''.join(S_temp_list)
        S_.add(s_temp)
        S_temp_list[0]=s_temp
        
S_=list(set(S_))
S_.sort()
# print(S_)
print(S_[K-1])

### FIXED CODE ###

S=list(input())
K=int(input())

S_=[]
for s in range(len(S)):
    s_temp=S[s]
    S_.append(s_temp)
    for e in range(s+1,len(S)):
        if e-s>K+10:
          break
        s_temp+=S[e]
        S_.append(s_temp)
        
S_=list(set(S_))
S_.sort()
# print(S_)
print(S_[K-1])
st input().split()
kazu = list(map(int, input().split()))
u = input()
a = {st[0]: kazu[0], st[1]: kazu[1]}
a[u] -= 1
print(a[0], a[1])

### FIXED CODE ###

s, t = input().split()
a, b = map(int, input().split())
u = input()
if s == u:
  print(a - 1, b)
else:
  print(a, b - 1)
a,b,k=map(int,input().split())
l=[]
for i in range(1,max(a,b)):
	if a%i==0 and b%i==0:
		l.append(i)
print(l[k-1])

### FIXED CODE ###

a,b,k=map(int,input().split())
l=[]

for i in range(1,(min(a,b))+1):
	if a%i==0 and b%i==0:
		l.append(i)
l.sort(reverse=True)
if a==1 or b==1:
    l=[1,1]
print(l[k-1])
from fractions import gcd

n, m = map(int, input().split())

s = input()
t = input()

# accept
# a c p
# a  e

# 最小公倍数。被ったらNG
l = n * m // gcd(n, m)
x = [None] * l
for i, c in enumerate(s):
    if i*l//n >= l:
        break
    x[i*l//n] = c

for i, c in enumerate(t):
    if i*l//m >= l:
        break
    
    a = x[i*l//m]
    if a is None:
        continue
    elif a != c:
        print(-1)
        exit()

print(l)


### FIXED CODE ###

from fractions import gcd

n, m = map(int, input().split())

s = input()
t = input()

# accept
# a c p
# a  e

g = gcd(n, m)
a = n // g
b = m // g
for i in range(g):
    if s[i*a] != t[i*b]:
        print(-1)
        exit()

print(n*m//g)
n = int(input()) 
X = [[int(i) for i in input().split()] for i in range(n)] 

from collections import Counter
def cal_diff(x1, x2):
    return (x1[0] - x2[0], x1[1] - x2[1])

hoge = [cal_diff(x1, x2) for x1 in X for x2 in X if x1 != x2]
minus = Counter(hoge).most_common(1)[0][1]
ans = n - minus
print(ans)


### FIXED CODE ###

n = int(input()) 
X = [[int(i) for i in input().split()] for i in range(n)] 

from collections import Counter
def cal_diff(x1, x2):
    return (x1[0] - x2[0], x1[1] - x2[1])

if n != 1:
  hoge = [cal_diff(x1, x2) for x1 in X for x2 in X if x1 != x2]
  minus = Counter(hoge).most_common(1)[0][1]
  ans = n - minus
  print(ans)
elif n == 1:
  print(1)
import numpy as np


def mo(v):
    return v % 1000000007


n = int(input())
a = mo(np.array(list(map(int, input().split()))))
s = 0
for i in range(0, n - 1, 1):
    for j in range(i + 1, n, 1):
        s += mo(a[i] * a[j])
print(mo(s))


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
s = [0]
ans = 0
MOD = 1000000007
for i in range(0, n, 1):
    s.append((s[i] + a[i]) % MOD)

for i in range(0, n, 1):
    ans += ((s[n] - s[i + 1]) * a[i]) % MOD

print(ans % MOD)
n=input()
a=[input().split() + [i+1] for i in range(n)]
for i in range(n):
  a[i][1]= -int(a[i][1])
a.sort()
for i in range(n):
  print(a[i][2])

### FIXED CODE ###

n=int(input())
a=[input().split() + [i+1] for i in range(n)]
for i in range(n):
  a[i][1]= -int(a[i][1])
a.sort()
for i in range(n):
  print(a[i][2])
n = int(input())
p=map(int, input().split())
q=map(int, input().split())

import math

a=0
for i in range(n-1):
  a +=(p[i]-1) * math.factorial(n-1-i)
  return a
  
b=0
for i in range(n-1):
  b +=(p[i]-1) * math.factorial(n-1-i)
  return b
  
print(abs(a-b))




### FIXED CODE ###

from itertools import permutations
n=int(input())
v=list(permutations(range(1,n+1),n))
print(abs(v.index(tuple(map(int,input().split())))-v.index(tuple(map(int,input().split())))))
N = int(input())
A = int(input())
B = int(input())

li[N*A,B]
print(str(min(li())))

### FIXED CODE ###

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

x = N*A
y = B

li = [x,y]
print(min(li))
N = int(input())
h = [int(x) for x in input().split()]

inf = float("inf")
dp = [inf] * N

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

### FIXED CODE ###

#　最小値を求めるDP　
#　Atcoder DP まとめコンテスト「A.Frog」　https://atcoder.jp/contests/dp/tasks/dp_a

N = int(input())
h = [int(x) for x in input().split()]

inf = float('inf')
dp = [inf] * N

dp[0] = 0
dp[1] = abs(h[1] - h[0]) #　1、２の初期値を設定

def chmin(a, b):
    if a > b:
        return b
    else:
        return a

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

print(dp[N - 1])
ab=input()
a=ab.split(' ')[0]
b=ab.split(' ')[1]
s=a*b
l=(a+b)*2
print("{0} {1}".format(s,l))


### FIXED CODE ###

ab=input()
a=int(ab.split()[0])
b=int(ab.split()[1])
s=a*b
l=(a+b)*2
print("{0} {1}".format(s,l))
N, M = map(int, input().split())
favorites = {*tuple(range(1, M + 1))}
for _ in range(N):
    K, *fav = map(int, input().split())
    favorites = favorites & set(fav)
print(len(favorites))


### FIXED CODE ###

N, M = map(int, input().split())
favorites = set(i for i in range(1, M + 1))
for _ in range(N):
    K, *fav = map(int, input().split())
    favorites = favorites & set(fav)
print(len(favorites))
dic = {}
for i in xrange(97, 123):
  dic.setdefault(chr(i), 0)

while True:
  input = raw_input()
  if input == "" or input == None:
    break
  for i in xrange(len(input)):
    if input[i].lower() in dic:
      dic[input[i].lower()] += 1

  # print dic
  for i in xrange(97, 123):
    print chr(i) + " : " + str(dic[chr(i)])

### FIXED CODE ###

import sys

dic = {}
for i in xrange(97, 123):
  dic.setdefault(chr(i), 0)

line = ""
while True:
  try:
    temp = raw_input()
    # print "temp = " + temp
    if temp != "":
      line += temp
    else:
      break
  except:
    break

# print line

for i in xrange(len(line)):
  try:
    if line[i].lower() in dic:
      dic[line[i].lower()] += 1
  except TypeError:
    continue

  # print dic
for i in xrange(97, 123):
  print chr(i) + " : " + str(dic[chr(i)])
n = int(input())
t = {i:[] for i in range(n)}
ans = [-1]*n
for _ in range(n-1):
    u, v, w = map(int, input().split())
    t[u-1].append((v-1, w))
    t[v-1].append((u-1, w))

def dfs(x):
    for y, w in t[x]:
        if ans[y] == -1:
            ans[y] = ans[x] if w % 2 == 0 else 1-ans[x]
            dfs(y)

ans[0] = 0
dfs(0)
for i in range(n):
    print(ans[i])

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**5)

n = int(input())
t = {i:{} for i in range(n)}
ans = [-1]*n
for _ in range(n-1):
    u, v, w = map(int, input().split())
    t[u-1][v-1] = w
    t[v-1][u-1] = w

def dfs(x):
    for y in t[x]:
        del t[y][x]
        ans[y] = ans[x] if t[x][y] % 2 == 0 else 1-ans[x]
        if len(t[y]) > 0:
            dfs(y)

ans[0] = 0
dfs(0)
for i in range(n):
    print(ans[i])
from math import gcd
N,X = map(int,input().split())
x = list(map(int,input().split()))
x.append(X)
x.sort()
ans = x[1]-x[0]
for i in range(N-1):
    ans = gcd(ans,x[i+1]-x[i])
print(ans)


### FIXED CODE ###

def gcd(a,b):
    while b:
        a,b = b,a%b
    return a
N,X = map(int,input().split())
x = list(map(int,input().split()))
x.append(X)
x.sort()
ans = x[1]-x[0]
for i in range(N):
    ans = gcd(ans,x[i+1]-x[i])
print(ans)
S=list(input())
X=753
ans=0
for i in range(0,8,1) :
    for j in range(0,8,1) :
        if int(S[i]) == j :
            demo = int(S[i]+S[i+1]+S[i+2])
            if demo >= ans :
                ans = demo
print(abs(X-ans))

### FIXED CODE ###

s = input()
ans = 9999
for i in range(len(s)-2):
  ans = min(ans,abs( int(s[i:i+3]) - 753 ))
print(ans)
#abc164-4
s = input()

counts = [0 for _ in range(2018)]#modの値と個数を記録するリスト
counts[0] += 1
d = 0
for i in range(0,len(s)):
    d += int(s[-i-1])*(10**i)
    #print(d)
    counts[d % 2019] += 1
#print(counts)
sumcount = 0

for m in counts:
    sumcount += m*(m-1)/2
print(int(sumcount))
#TLE

### FIXED CODE ###

s = input()[::-1] # 入力文字列を逆順でsに格納

counts = [0] * 2019
counts[0] = 1

num, d = 0, 1

for char in s:
    num += int(char) * d
    num %= 2019
    d *= 10
    d%= 2019
    counts[num] += 1

ans = 0
for cnt in counts:
    ans += cnt * (cnt - 1) // 2

print(ans) # 答えの出力
import math as m
from functools import reduce

n = int(input())
l = []


def f(a, b):
    return int(a * b // m.gcd(a, b))


for i in range(n):
    l.append(int(input()))
print(reduce(f, l))





### FIXED CODE ###

import math as m
from functools import reduce
n,T= int(input()),[]
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
for i in range(n):
    T.append(int(input()))
tmp = max(T)
for i in range(n):
    if tmp % T[i] != 0:
        tmp = T[i]//gcd(tmp, T[i])*tmp

print(tmp)
N, K = map(int, input().split())
args = map(int, input().split())
count = len(set(args))
balls = {}
for ball in count:
    balls[ball] = 0

for i in args:
    balls[i] += 1
if count <= K:
    print (0)
else:
    print (sum(sorted(balls.values())[0:max(count-K, 0)]))


### FIXED CODE ###

N, K = map(int, input().split())
args = list(map(int, input().split()))
ballset = set(args)
balls = {}
for ball in ballset:
    balls[ball] = 0
for i in args:
    balls[i] += 1
count = len(ballset)
if count <= K:
    print (0)
else:
    print (sum(sorted(balls.values())[0:max(count-K, 0)]))
N, M = map(int, input().split())
sc = [list(map(int, input().split())) for _ in range(M)]
chk = [0, 0, 0]
cnt = [0, 0, 0]
ans = ''

ans = -1
for i in range(1, 1000):
    cnt = 0
    for j in range(M):
        if len(str(i)) < M:
            break
        if str(i)[sc[j][0] - 1] == str(sc[j][1]):
            cnt += 1

    if cnt == M:
        ans = i
        break

print(ans)

### FIXED CODE ###

N, M = map(int, input().split())
sc = [list(map(int, input().split())) for _ in range(M)]
chk = [0, 0, 0]
cnt = [0, 0, 0]
ans = ''
ans = -1
sc2 = []

if M == 0:
    if N == 1:
        print(0)
        exit()
    else:
        tmp = ''
        for i in range(N):
            if i == 0:
                tmp += '1'
            else:
                tmp += '0'
        print(int(tmp))
        exit()
for i in range(M):
    if cnt[sc[i][0] - 1] == 0:
        chk[sc[i][0] - 1] = sc[i][1]
        cnt[sc[i][0] - 1] += 1
        sc2.append([sc[i][0], sc[i][1]])
    else:
        if chk[sc[i][0] - 1] != sc[i][1]:
            print(-1)
            exit()

for i in range(1000):
    cnt = 0
    for j in range(len(sc2)):
        if len(str(i)) < N:
            break
        if str(i)[sc2[j][0] - 1] == str(sc2[j][1]):
            cnt += 1

    if cnt >= len(sc2):
        ans = i
        break

print(ans)
import collections
N = int(input()) 
S = [0]*N
for i in range(N):
    S[i] = input()
c = collections.Counter(S)
values,counts = zip(*c.most_common())
X = c.most_common()[0][1]
for i in range(0,len(c.most_common())):
    if c.most_common()[i][1] == X:
        list.append(c.most_common()[i][0])
list.sort()
print(list)
for i in range(len(list)):
    print(list[i])

### FIXED CODE ###

import collections
N = int(input()) 
S = [0]*N
m = 0
for i in range(N):
    S[i] = input()
c = collections.Counter(S)
values,counts = zip(*c.most_common())
X = c.most_common()[0][1]
list = []
for i in range(0,len(c.most_common())):
    if counts[i] == X:
        list.append(values[i])
        m+=1
    else:
        break
list.sort()
for i in range(0,m):
    print(list[i])
s=input()
while s>0:
  if s[-5:]=='dream':
    s=s[:-5]
  elif s[-5:]=='erase':
    s=s[:-5]
  elif s[-6:]=='eraser':
    s=s[:-6]
  elif s[:-7]=='dreamer':
    s=s[:-7]
  else:
    print('NO')
    exit()
print('YES')

### FIXED CODE ###

s=input()
while len(s)>4:
  if s[-5:]=='dream':
    s=s[:-5]
  elif s[-5:]=='erase':
    s=s[:-5]
  elif len(s)<6:
    print('NO')
    exit()
  elif s[-6:]=='eraser':
    s=s[:-6]
  elif len(s)<7:
    print('NO')
    exit()
  elif s[-7:]=='dreamer':
    s=s[:-7]
  else:
    print('NO')
    exit()
print('YES')
class uni:
    def __init__(self,n):
        self.n = n
        self.pare = [i for i in range(n)]

    def find(self,x):
        if self.pare[x] == x:
            return x
        else:
            self.pare[x] = self.find(self.pare[x])
            return self.pare[x]

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

    def show(self):
        return self.pare


N, M, K = map(int,input().split())
size = [0]*N
count = [0]*N
side = [[]for i in range(N)]
union = uni(N)
for i in range(M):
    a,b = map(int,input().split())
    union.union(a-1,b-1)
    count[a-1] += 1
    count[b-1] += 1
for i in range(N):
    size[union.find(i)] += 1
for i in range(K):
    c,d = map(int,input().split())
    if union.pare[c-1] == union.pare[d-1]:
        count[c-1] += 1
        count[d-1] += 1
for i in range(N):
    print(size[union.pare[i]]-count[i]-1,end=" ")
print()

### FIXED CODE ###

class uni:
    def __init__(self,n):
        self.n = n
        self.pare = [i for i in range(n)]
        self.rank = [0]*n

    def find(self,x):
        if self.pare[x] == x:
            return x
        else:
            self.pare[x] = self.find(self.pare[x])
            return self.pare[x]

    def union(self,x,y):
        x = self.find(x)
        y = self.find(y)
        if self.rank[x] < self.rank[y]:
            self.pare[x] = y
        else:
            self.pare[y] = x
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1

    def show(self):
        return self.pare


N, M, K = map(int,input().split())
size = [0]*N
count = [0]*N
side = [[]for i in range(N)]
union = uni(N)
for i in range(M):
    a,b = map(int,input().split())
    union.union(a-1,b-1)
    count[a-1] += 1
    count[b-1] += 1
for i in range(N):
    size[union.find(i)] += 1
for i in range(K):
    c,d = map(int,input().split())
    if union.pare[c-1] == union.pare[d-1]:
        count[c-1] += 1
        count[d-1] += 1
for i in range(N):
    print(size[union.pare[i]]-count[i]-1,end=" ")
print()
n, m = map(int, input())
ans = (n-1)*(m-1)
print(ans)

### FIXED CODE ###

n, m = map(int, input().split())
ans = (n-1)*(m-1)
print(ans)
import sympy
A= sympy.factorint(int(input()))
X = list(A)
E = max(X)
if sum(list(A.values()))>2:
  print("NO")
elif E > 9:
  print("No")
else:
  print("Yes")

### FIXED CODE ###

N = int(input())
t = 0
for i in range(1,10):
  if N % i == 0:
    if N / i >= 10:
      continue
    else:
      t = 1
      break
  else:
    continue
if t >0:
    print("Yes")
else:
    print("No")
# -*- coding: utf-8 -*-
def main():
    N = int(input())
    H = list(map(int,input().split()))
    H.reverse()
    for i in range(N):
        if H[i]==H[i+1]:
            continue
        if (H[i+1]-H[i])==1:
            H[i+1]=H[i+1]-1
        else:
            print('No')
    print('Yes')

if __name__ == '__main__':
    main()

### FIXED CODE ###

# -*- coding: utf-8 -*-
def main():
    N = int(input())
    H = list(map(int,input().split()))
    H.reverse()
    for i in range(N):
        if i != N-1:
            if H[i]>=H[i+1]:
                continue
            if (H[i+1]-H[i])==1:
                H[i+1]=H[i+1]-1
            else:
                print('No')
                return
    if H[N-1]<=H[N-2] or (H[N-1]-H[N-2]==1):
        print('Yes')
        return
    else:
        print('No')
        return

if __name__ == '__main__':
    main()
N = int(input())
H = input().split(" ")
c = [10 ** 7 for i in range(N)]
c[0] = 0
c[1] = abs(int(H[0])-int(H[1]))
for i in range(N-2):
  c[i+2] = min(c[i]+abs(H[i]-H[i+2]),c[i+1]+abs(H[i+1]-H[i+2]))
print(c[len(c)-1])

### FIXED CODE ###

N = int(input())
H = input().split(" ")
c = [10 ** 7 for i in range(N)]
c[0] = 0
c[1] = abs(int(H[0])-int(H[1]))
for i in range(N-2):
  c[i+2] = min(c[i]+abs(int(H[i])-int(H[i+2])),c[i+1]+abs(int(H[i+1])-int(H[i+2])))
print(c[len(c)-1])
n,k=map(int,input().split())
a=n
b=(n//k)
c=n-k*b
d=c-k

  
if abs(c)>abs(d):
    print(str(abs(d)))
else:
    print(str(abs(c)))


### FIXED CODE ###

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


print(a,b,c)
x, y, z = map(int, input().split())
 
print(z+""+x+""+y)

### FIXED CODE ###

x,y,z=map(int,input().split())
print(z,x,y)
import re
s=input()

def hoge(str)
	if(str == ""):
  		return "YES"
	if(str.startWith("dream")):
		return hoge(re.sub('^dream', '', str))
	if(str.startWith("dreamer")):
		return hoge(re.sub('^dreamer', '', str))
	if(str.startWith("erase")):
		return hoge(re.sub('^erase', '', str))
	if(str.startWith("eraser")):
		return hoge(re.sub('^eraser', '', str))
	return "NO"

print(hoge(s))

### FIXED CODE ###

def main():
    S = input()

    while len(S) >= 5:
        if len(S) >= 7 and S[-7:] == "dreamer":
            S = S[:-7]
            continue

        if len(S) >= 6 and S[-6:] == "eraser":
            S = S[:-6]
            continue

        elif S[-5:] == "dream" or S[-5:] == "erase":
            S = S[:-5]
            continue

        else:
            break

    if len(S) == 0:
        print("YES")
    else:
        print("NO")

main()
print(input()[:3]+"8"+input()[5:])

### FIXED CODE ###

a=input()
print(a[:3]+"8"+a[4:])
N =int(input())
p=N
while cnt <10**7:
    if is_prime(p):
        p +=1
    else:
        print(p)
        break

### FIXED CODE ###

def is_prime(n):
    for p in range(2,n):
        if n % p ==0:
            return True

N =int(input())
p=N
while p <10**7:
    if is_prime(p):
        p +=1
    else:
        print(p)
        break
h,w,m = map(int, input().split())
mp =  [[0 for i in range(h)] for j in range(w)]
for i in range(m):
  l =list(map(int, input().split()))
  mp[l[1]-1][l[0]-1] = 1
mx = 0
for y in range(w):
  for x in range(h):
    cn = 0
    #X軸について
    for xx in range(h):
      cn += mp[y][xx]
    #Y軸について
    for yy in range(w):
      if yy != y:
        cn += mp[yy][x]
    if cn > mx:
      mx = cn
print(mx)

### FIXED CODE ###

n,x,t = map(int, input().split())
q,m = divmod(n,x)
if m > 0:
    q += 1
print(q * t)
s = list(input())
t = list(input())
if len(t) - len(s) == 1 and for i in range(len(t)):
  s[i] == t[i] 
  print("yes")
else:
  print("no")

### FIXED CODE ###

s = input()
t = input()

same = 0
for i in range(len(s)):
	if s[i] == t[i]:
		same += 1

if same == len(s) and len(t) - len(s) == 1:
	print("Yes")

else:
	print("No")
N, M = [int(k) for k in input().split()]
nodes = {k:set() for k in range(1,N+1)}
visited = [False for i in range(N+1)]

for i in range(M):
  a, b = [int(k) for k in input().split()]
  nodes[a].add(b)
  nodes[b].add(a)
  
def dfs(i):
  visited[i] = True
  cnt = 1
  for j in nodes[i]:
    if not visited[j]:
      cnt += dfs(j)
      
  return cnt
   
ans = 0
for z in nodes:
  if not visited[z]:
    ans = max(dfs(i),ans)

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 program():
  N, M = map(int, input().split())
  uf = UnionFind(N)
  for i in range(M):
    a, b = map(int, input().split())
    uf.union(a-1,b-1)
  
  ans = max([uf.size(i) for i in range(N)])
  return ans

print(program())
n,k= map(int, input().split())
a= list(map(int, input().split()))
a.sort()




# めぐる式二部探索
l=-1
r=pow(10,11)
while r-l>1:
    # rは常にOK、lは常にNG。
    mid=l+(r-l)//2
    cnt=k
    flag=True
    for i in range(n):
        if a[i]>mid:
            cnt-=a[i]//mid
            if cnt<0:
                flag=False
                break
    # なんらかの判定
    if flag:
        r = mid  # 判定がOKのとき→範囲を左に狭める
    else:
        l = mid  # 判定がNGのとき→範囲を右に狭める

print(r)

### FIXED CODE ###

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

if k==0:
    print(a[-1])
    exit()


# めぐる式二部探索
l=0
r=pow(10,11)
while r-l>1:
    # rは常にOK、lは常にNG。
    mid=l+(r-l)//2
    cnt=k
    flag=True
    for i in range(n):
        if a[i]>mid:
            x=-(-a[i]//mid)-1
            cnt-=x

    # なんらかの判定
    if cnt>=0:
        r = mid  # 判定がOKのとき→範囲を左に狭める
    else:
        l = mid  # 判定がNGのとき→範囲を右に狭める

print(r)
import numpy as np

k,x = np.array(list(map(int,input().split())))
initial = int(x)

for index in range(k-1):
  x = np.append(x,initial+index+1)
  x = np.insert(x,0,initial-index-1)
  
print(" ".join(list(map(str,x))))

### FIXED CODE ###

import numpy as np

k,x = np.array(list(map(int,input().split())))
initial = int(x)

for index in range(k-1):
  x = np.append(x,initial+index+1)
  x = np.insert(x,0,initial-index-1)

if x.size > 1:
  print(" ".join(list(map(str,x))))
else:
  print(x)
import sys
myset=set()
for n in range(3):
	myset[n-1].add(sys.argv[n])
if len(myset)==2:
	print("Yes")
else:
	print("No")

### FIXED CODE ###

a,b,c=map(int,input().split())
s=set([a,b,c])
if len(s)==2:
  print("Yes")
else:
  print("No")
size = int(input())
A = list(map(int,input().split()))
i = list(range(1,size+1))

remain_list = [A-i for(A,i) in zip(A,i)]
while(True):
    zero_count = len([i for i in remain_list if i ==0])
    minus_count = len([i for i in remain_list if i <0])
    plus_count = len([i for i in remain_list if i > 0])

    if zero_count == max(zero_count,minus_count,plus_count) or plus_count == minus_count:
        break

    if plus_count == max(zero_count,minus_count,plus_count):
        remain_list = [num - 1 for num in remain_list]

    if minus_count == max(zero_count,minus_count,plus_count):
        remain_list = [num + 1 for num in remain_list]


sum_list =[abs(num) for num in remain_list]

print(sum(sum_list))


### FIXED CODE ###

num = int(input())
if num % 2 != 0:
    print(num*2)
else:
    print(num)