Harryxun/stf_run huggingface dataset:
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？

#https://atcoder.jp/contests/cf16-final-open/tasks/codefestival_2016_final_b

n=ii()

if n==1:
    print(1)
    exit()

ans=0
i=0
while ans<n:
    i+=1
    ans+=i
if ans>n:
    p=ans-n

for k in range(1,i+1):
    if k!=p:
        print(k)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？

#https://atcoder.jp/contests/cf16-final-open/tasks/codefestival_2016_final_b

n=ii()

if n==1:
    print(1)
    exit()

ans=0
i=0
p=0
while ans<n:
    i+=1
    ans+=i
if ans>n:
    p=ans-n

for k in range(1,i+1):
    if k!=p:
        print(k)
import sys

def main():
    N, M = list(map(int, input().split()))
    X = list(map(int, input().split()))

    if M == 1:
        print('0')
        exit()

    X = sorted(X)

    kukan = []
    for i in range(1, M):
        kukan.append(X[i]-X[i-1])

    kukan = sorted(kukan, reverse=True)

    jogai = 0
    for j in range(N-1):
        jogai += kukan[j]

    print(X[M-1] - X[0] - jogai)

main()

### FIXED CODE ###

import sys

def main():
    N, M = list(map(int, input().split()))
    X = list(map(int, input().split()))

    if N >= M:
        print('0')
        exit()

    X = sorted(X)

    kukan = []
    for i in range(1, M):
        kukan.append(X[i]-X[i-1])

    kukan = sorted(kukan, reverse=True)

    jogai = 0
    for j in range(N-1):
        jogai += kukan[j]

    print(X[M-1] - X[0] - jogai)

main()
_ = input()
a = input()

a = a.split(" ")
b = []
d = 0
flag = True
for i in a:
    if int(i)%2 == 0:
        b.append(int(i))
    else:
        print(0)
        flag = False
        break
if flag == True:
    c = min(b)
    while c%2 == 0:
        c = c/2
        d += 1
    print(d)

### FIXED CODE ###

a = input()

b=0
if a[0] == "1":
   b+=1
if a[1] == "1":
   b+=1
if a[2] == "1":
   b+=1

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

bo = True
if a[0]+a[1] < a[2]*2:
    bo = False
if a[3] > a[4]:
    if bo == True and a[2]*2 >= a[0]:
            price = a[2]*a[4]*2 + (a[3]-a[4])*a[0]
    elif bo == True:
        price = a[2]*a[3]*2
    else:
        price = a[0]*a[3]+a[1]*a[4]
else:
    if bo == True and a[2]*2 >= a[1]:
            price = a[2]*a[3]*2 + (a[4]-a[3])*a[1]
    elif bo == True:
        price = a[2]*a[4]*2
    else:
        price = a[0]*a[3]+a[1]*a[4]
print(price)

### FIXED CODE ###

#-*- coding: utf-8 -*-

price = 700
S = input()
for i in S:
    if i == 'o':
        price = price + 100
print(price)
X, Y, Z, K = [int(i) for i in input().split()]
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
C = [int(i) for i in input().split()]
A = sorted([int(x) for x in A], reverse=True)
B = sorted([int(x) for x in B], reverse=True)
C = sorted([int(x) for x in C], reverse=True)

res = []
memo = []
i, j, k = 0, 0, 0
while len(res) < K:
  if [i, j, k] not in memo:
    res.append(A[i]+B[j]+C[k])
    memo.append([i,j,k])
  if i+1 < X and [i+1, j, k] not in memo:
    res.append(A[i+1]+B[j]+C[k])
    memo.append([i+1, j, k])
  if j+1 < Y and [i, j+1, k] not in memo:
    res.append(A[i]+B[j+1]+C[k])
    memo.append([i, j+1, k])
  if k+1 < Z and [i, j, k+1] not in memo:
    res.append(A[i]+B[j]+C[k+1])
    memo.append([i, j, k+1])
  if i < X:
    i += 1
  if j < Y:
    j += 1
  if k < Z:
    k += 1
res = sorted(res, reverse=True)[:K]
for i in res:
  print(i)

### FIXED CODE ###

from heapq import *

X, Y, Z, K = [int(i) for i in input().split()]
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
C = [int(i) for i in input().split()]
A = sorted([int(x) for x in A], reverse=True)
B = sorted([int(x) for x in B], reverse=True)
C = sorted([int(x) for x in C], reverse=True)

res = []
memo = []
ans = []
heappush(res, (-A[0]-B[0]-C[0], 0, 0, 0))
while len(ans) < K:
  e, i, j, k = heappop(res)
  ans.append(-e)
  if i+1 < X and [i+1, j, k] not in memo:
    heappush(res, (-A[i+1]-B[j]-C[k], i+1, j, k))
    memo.append([i+1, j, k])
  if j+1 < Y and [i, j+1, k] not in memo:
    heappush(res, (-A[i]-B[j+1]-C[k], i, j+1, k))
    memo.append([i, j+1, k])
  if k+1 < Z and [i, j, k+1] not in memo:
    heappush(res, (-A[i]-B[j]-C[k+1], i, j, k+1))
    memo.append([i, j, k+1])

for i in ans:
  print(i)
N,M,X = map(int,input().split())
a = list(map(int(input().split())))
b = []
c = []
for i in range(0,X):
  if i in a:
    b.append(1)
for i in range(X+1,N):
  if i in a:
    c.append(1)
print(min(sum(b),sum(c)))

### FIXED CODE ###

#!/usr/bin/env python
# -*- coding: utf-8 -*-
N,M,X = map(int,input().split()) #整数の入力
a = list(map(int,input().split()))
#検問所の入力
b=[]
c=[]
for i in range(X+1,N): #X+1からNの範囲の整数について 
  if i in a: #ある整数が検問所の整数として存在する
    b.append(1)
for i in range(1,X): #1からX-1の範囲の整数について
  if i in a: #ある整数が検問所の整数として存在する
    c.append(1)
print(min(sum(b),sum(c)))
from scipy import ndimage
import numpy as np

 
H, W = map(int, input().split())
 
A_array = np.array(
    [[0 if s == "#" else 1 for s in input()[:-1]] for i in range(H)])
# print(A_array)

print(A_array)
 
# print(A_array)
b = ndimage.morphology.distance_transform_cdt(
    A_array, metric="taxicab")
print(np.max(b))

### FIXED CODE ###

from scipy import ndimage
import numpy as np

 
H, W = map(int, input().split())
 
A_array = np.array(
    [[0 if s == "#" else 1 for s in input()] for i in range(H)])
# print(A_array)
 
# print(A_array)
b = ndimage.morphology.distance_transform_cdt(
    A_array, metric="taxicab")
print(np.max(b))
ans = 1
if 0 in A:
    print(-1)
else:
    for i in A:
        ans *= i
        if ans > 1000000000000000000:
            print(-1)
            exit()
print(ans)

### FIXED CODE ###

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

ans = 1
if 0 in A:
    print(0)
else:
    for i in A:
        ans *= i
        if ans > 1000000000000000000:
            print(-1)
            exit()
    print(ans)
N, T = map(int, input().split())

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

cost = 0

for i in range(N):
    if array[i][1] <= T and (cost == 0 or cost < array[i][0]:
    　   cost = arrayp[i][0]
if cost == 0:
    print('TLE')
print(cost)


### FIXED CODE ###

N, T = map(int, input().split())
array = [list(map(int, input().split())) for i in range(N)]

cost = 0
time = 0

for i in range(N):
    if array[i][1] <= T and (cost > array[i][0] or cost == 0):
        cost = array[i][0]

if cost == 0:
    print('TLE')
    exit()

print(cost)
N,K=map(int,input().split())
h=[]
a=0
for i in range(1,N+1):
    i=input()
    h.append(i)
    if int(i)>=int(K):
        a+=1
        
print(a)

### FIXED CODE ###

N,K=map(int,input().split())
h=list(map(int,input().split()))
a=0
for idx in h:
    if idx>=K:
        a+=1
        
print(a)
n = int(input())
v = map(int, input().split())

v.sort()

value = v[0]
for i in range(1, len(v)):
  value = (value + v[i]) / 2

print(value)             
  

### FIXED CODE ###

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

v.sort()

value = v[0]
for i in range(1, len(v)):
  value = (value + v[i]) / 2

print(value)
n = int(input())


def get_smallest_under_35(_n):
    j = _n // 9
    cand = []
    for k in range(1, j + 1):
        __n = _n
        __n -= 9 * k
        l = __n // 6
        __n -= l * 6
        cand.append(k + l + __n)
    return min(cand)

def get_smallest_under_215(_n):
    j = _n//81
    _n -= 81*j
    k = _n // 36
    _n -= 36 * k
    return get_smallest_under_35(_n)+j+k

def get_smallest_under_728(_n):
    j = _n // 216
    if j == 0:
        return get_smallest_under_215(_n)

    cand = []
    for k in range(1, j + 1):
        __n = _n
        __n -= 216 * k
        _cnt = k
        if _n <= 215:
            cand.append(get_smallest_under_215(__n) + _cnt)
        else:
            cand.append(get_smallest_under_728(__n) + _cnt)
    return min(cand)


num_list = []

for i in range(1, 7):
    num_list.append(pow(6, i))
    if i <= 5:
        num_list.append(pow(9, i))
num_list = sorted(num_list)
cnt = 0
is_break = True
while is_break :
    for i in range(len(num_list)-1, -1, -1):
        if n <= 728:
            is_break = False
            break
        if num_list[i] < n:
            n -= num_list[i]
            cnt += 1
            break
print(get_smallest_under_728(n)+cnt)


### FIXED CODE ###

n = int(input())

dp = [0 for i in range(max(n+1, 36))]

for i in range(35):
    j = i // 9
    cand = []
    for k in range(j+1):
       _i = i
       _i -= 9*k
       l = _i // 6
       for m in range(l+1):
           __i = _i
           __i -= 6*m
           cand.append(k+m+__i)
    dp[i] = min(cand)
nine_list = [pow(9, i) for i in range(1, 6)]
six_list = [pow(6, i) for i in range(1, 7)]
for i in range(35, n+1):
    max_nine = nine_list[len(nine_list) - 1]
    max_six = six_list[len(six_list) - 1]
    for j in range(len(nine_list)):
        if nine_list[j] > i:
            max_nine = nine_list[j-1]
            break
    for j in range(len(six_list)):
        if six_list[j] > i:
            max_six = six_list[j-1]
            break
    dp[i] = min(dp[i-max_nine]+1, dp[i-max_six]+1)

print(dp[n])
n, k = map(int, input().split())
p = list(map(int, input().split()))

p = [sum(p[0+i:k+i]) for i in range(n-k+1)]
l = []
a = sum(p[0:k])
for i in range(n-k+1):
    a = a+p[i]-p[i+k-1]
    l.append(a)
print((max(l)+k)/2)

### FIXED CODE ###

n, k = map(int, input().split())
p = list(map(int, input().split()))
a = sum(p[0:k])
l = [a]
for i in range(n-k):
    a = a-p[i]+p[i+k]
    l.append(a)
print((max(l)+k)/2)
from sys import stdin
import numpy as np
inf = 10**10
h,w = [int(x) for x in stdin.readline().rstrip().split()]

li = [["#" for i in range(w)]for j in range(h)]
for i in range(h):
    s = stdin.readline().rstrip()
    for j in range(w):
        li[i][j] = s[j]

def all_pairs_shortest_paths(W):
    # 頂点の数
    n = len(W)
    # 結果を格納する行列を用意する
    res = [[0] * n for i in range(n)]
    # 用意した行列を初期化する
    for i in range(n):
        for j in range(i, n):
            if i == j:
                val = 0
            elif W[i][j]:
                val = W[i][j]
            else:
                val = inf
            res[i][j] = res[j][i] = val
    # 動的計画法ですべての超点間の最短距離を求める
    for k in range(n):
        for u in range(n):
            for v in range(n):
                res[u][v] = min(res[u][v], res[u][k] + res[k][v])
    return res

a = np.arange(h*w)
a = a.reshape([h,w])
a = a.tolist()

lin = [[0 for i in range(h*w)]for j in range(h*w)]

for i in range(h):
    for j in range(w-1):
        if li[i][j] == "." and li[i][j+1] == ".":
            lin[a[i][j]][a[i][j+1]] = 1
            lin[a[i][j+1]][a[i][j]] = 1

for i in range(h-1):
    for j in range(w):
        if li[i][j] == "." and li[i+1][j] == ".":
            lin[a[i][j]][a[i+1][j]] = 1
            lin[a[i][j]][a[i+1][j]] = 1

lis = all_pairs_shortest_paths(lin)

ma = 0
for i in range(h*w):
    for j in range(h*w):
        if lis[i][j] != 10**10:
            ma = max(lis[i][j],ma)

print(ma)

### FIXED CODE ###

from sys import stdin

inf = 10**10
h,w = [int(x) for x in stdin.readline().rstrip().split()]

li = [["#" for i in range(w)]for j in range(h)]
for i in range(h):
    s = stdin.readline().rstrip()
    for j in range(w):
        li[i][j] = s[j]

def all_pairs_shortest_paths(W):
    # 頂点の数
    n = len(W)
    # 結果を格納する行列を用意する
    res = [[0] * n for i in range(n)]
    # 用意した行列を初期化する
    for i in range(n):
        for j in range(i, n):
            if i == j:
                val = 0
            elif W[i][j]:
                val = W[i][j]
            else:
                val = inf
            res[i][j] = res[j][i] = val
    # 動的計画法ですべての超点間の最短距離を求める
    for k in range(n):
        for u in range(n):
            for v in range(n):
                res[u][v] = min(res[u][v], res[u][k] + res[k][v])
    return res

a = [[0 for i in range(w)]for j in range(h)]
for i in range(h):
    for j in range(w):
        a[i][j] = i*w + j

lin = [[0 for i in range(h*w)]for j in range(h*w)]

for i in range(h):
    for j in range(w-1):
        if li[i][j] == "." and li[i][j+1] == ".":
            lin[a[i][j]][a[i][j+1]] = 1
            lin[a[i][j+1]][a[i][j]] = 1

for i in range(h-1):
    for j in range(w):
        if li[i][j] == "." and li[i+1][j] == ".":
            lin[a[i][j]][a[i+1][j]] = 1
            lin[a[i][j]][a[i+1][j]] = 1

lis = all_pairs_shortest_paths(lin)

ma = 0
for i in range(h*w):
    for j in range(h*w):
        if lis[i][j] != 10**10:
            ma = max(lis[i][j],ma)

print(ma)
#! -*- coding:utf-8 -*-
def gcd(a, b):
    if b == 0: return a
    return gcd(b, a % b)
 
def lcm(c, d):
    return c * d / gcd(c, d)

n = int(input())
k = []
for i in range(n):
    k.append(int(input()))

p = lcm(k[0],k[1])
for i in range(n):
    p = lcm(p,k[i])
print(int(p))


### FIXED CODE ###

#! -*- coding:utf-8 -*-
def gcd(a, b):
    while b > 0:
        a, b = b, a % b
    return a
 
def lcm(a, b):
    return a * b // gcd(a, b)

n = int(input())
k = []
for i in range(n):
    k.append(int(input()))

if n == 1:
    print(k[0])
else:
    p = lcm(k[0],k[1])
    for i in range(n):
        p = lcm(p,k[i])
    print(int(p))
a,b = map(int, input().split())
print(6-a-b)

### FIXED CODE ###

a = int(input())
b = int(input())
print(6-a-b)
def main():

    A, B = input().split()
    A = int(A)
    B = float(B)
    f = B - int(B)
    v = int(A * f)
    v += int(B) * int(A)
    return v

if __name__ == '__main__':
    print(main())


### FIXED CODE ###

def main():

    N = int(input())
    a, b = [], []
    for _ in range(N):
        A, B = map(int, input().split())
        a.append(A)
        b.append(B)

    a.sort()
    b.sort()

    if N % 2 == 0:
        u = a[N//2-1] + a[N//2]
        v = b[N//2-1] + b[N//2]
        return max((v-u)+1, 0)
    else:
        u = a[(N)//2]
        v = b[(N)//2]
        return max(v-u+1, 0)

if __name__ == '__main__':
    print(main())
n = int(input())
a = [int(input()) for _ in range(n)]
i = 1
c = 0
while True:
  if i == 2:
    print(c)
    quit(0)
  if a[i] == i:
    print(-1)
    quit(0)
  c += 1
  i, a[i] = a[i], i

### FIXED CODE ###

n = int(input())
a = [0] + [int(input()) for _ in range(n)]
i = 1
c = 0
while True:
  if i == 2:
    print(c)
    quit(0)
  if a[i] == i:
    print(-1)
    quit(0)
  c += 1
  tmp = a[i]
  a[i] = i
  i = tmp
K,N=map(int,input())
A=list(map(int,input().split())
L_max=0
for i in range(A):
    if i<len(A)-1:
        l=A[i+1]-A[i]
    else:
        l=K-A[-1]+A[0]
    if L_max<l:
        L_max=l
ans=sum(A)-L_max
print(ans)

### FIXED CODE ###

K,N=map(int,input().split())
A=list(map(int,input().split()))
max_ans=0
for i in range(N):
    if i==N-1:
        ans=K-A[N-1]+A[0]
    else:
        ans=A[i+1]-A[i]
    if max_ans<ans:
        max_ans=ans
ans=K-max_ans
print(ans)
S = str(input())

data = []

count = 0
for i in range(len(S)):
    for j in range(i+4, min(i+9,len(S)+1)):
        if(int(S[i:j]) % 2019 == 0):
            count += 1
            data.append([i,j])

for i in range(len(data) - 1):
    if(data[i][1] == data[i+1][0]):
        count += 1

print(count)

### FIXED CODE ###

S, W = map(int, input().split())

if(W >= S):
    print("unsafe")
else:
    print("safe")
import sys
n,m = map(int,input().split())
a = []
for i in range(m):
    a.append(int(input()))
fib = [1,1]
#n段登る場合の数がfib[n]になるようにする
for i in range(n):
    fib.append((fib[i]+fib[i+1])%1000000007)
answer = 1
answer *= fib[a[0]-1]
if m > 1:
    if a[0]+1 == a[1]:
        print(0)
        sys.exit()
for i in range(m-1):
    if a[i] + 1 == a[i+1]:
        print(0)
        sys.exit()
    answer = answer * fib[a[i+1]-a[i]-2] % 1000000007
answer = answer * fib[n - a[m-1] -1] % 1000000007
print(answer)

### FIXED CODE ###

import sys
n,m = map(int,input().split())
a = []
for i in range(m):
    a.append(int(input()))
fib = [1,1]
for i in range(n):
    fib.append((fib[i]+fib[i+1])%1000000007)
if m == 0:
    print(fib[n]%1000000007)
    sys.exit()
answer = fib[a[0]-1]
for i in range(m-1):
    if a[i] + 1 == a[i+1]:
        answer = 0
    else:
        answer = answer * fib[a[i+1]-a[i]-2] % 1000000007
answer = answer * fib[n-a[m-1]-1] % 1000000007
print(answer)
N = int(input())
listA = list(map(int, input().split(' ')))

from fractions import gcd

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

total_times = 1
for i in listA:
  total_times = total_times * i

result = 0
prev = 1
for i in listA:
  result += total_times / i

print(int(result * lcm(a) / total_times % (10 ** 9 + 7)))

### FIXED CODE ###

N = int(input())
listA = list(map(int, input().split(' ')))

from fractions import gcd

tmp_lcm = 1
sumB = 0
for i in listA:
  tmp_gcd = gcd(tmp_lcm, i)
  next_lcm = (tmp_lcm * i) // tmp_gcd
  sumB = sumB * (next_lcm // tmp_lcm) + (next_lcm // i)
  tmp_lcm = next_lcm

print(sumB % (10 ** 9 + 7))
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

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]:
    ans = bfs(Grid,0,0,queue)
    if ans == -1:
        print(-1)
    else:
        print(H*W - ans - 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)
# utf-8:
import numpy as np


def main():
    n = int(raw_input())
    if n == 1:
        print(n)
    else:
        for i in range(n, 0, -1):
            sqrt = np.sqrt(n)
            if sqrt - int(sqrt) == 0:
                print(n)
                break


if __name__ == '__main__':
    main()


### FIXED CODE ###

# utf-8:
import math as np


def main():
    n = int(raw_input())
    a = int(np.sqrt(n))
    print(a * a)


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

ct = 0
while(1) :
  count = 0
  for i in range(n):
    if a[i]%2 != 0:
      count+=1
  if count != 0:
    break
  else:
    a1 = [j/2 for j in a]
    a = a1
    ct += 1
  
print(ct)

### FIXED CODE ###

s = input()
c = 0

for si in s:
  if si == '1': c+=1
    
print(c)
x = int(input())
a = 0
if x == 0:
    print(0, 0)
else:
    while a ** 5 - (a - 1) ** 5 < x:
        a += 1
        b = a
        while a ** 5 - b ** 5 < x:
            b -= 1
            if a ** 5 - b ** 5 == x:
                break
        else:
            continue
        break
    print(a, b)

### FIXED CODE ###

x = int(input())
a = 0
if x == 0:
    print(0, 0)
else:
    while a ** 5 - (a - 1) ** 5 <= x:
        a += 1
        b = a
        while a ** 5 - b ** 5 < x:
            b -= 1
            if a ** 5 - b ** 5 == x:
                break
        else:
            continue
        break
    print(a, b)
import sys

def dfs(heights: int, a_index:int):
    if n < heights:
        return
    
    if m != 0 and a_index <= len(a) -1 and a[a_index] == heights:
        memo[heights] = 0
        a_index += 1
        #print("10",heights)
    else:
        memo[heights] = memo[heights-1] + memo[heights -2]
        #print("13",heights)
    dfs(heights+1,a_index)
    return
    

n,m = list(map(int, input().split()))
memo = [1]*(n+1)
a = []
a_index = 0
if m != 0:
    for i in range(m):
        tmp = int(input())
        if i >= 1 and tmp -1 == a[len(a)-1]:
            print(0)
            sys.exit()
        else:
            a.append(tmp)
            #print(i,a)

    if a[0] == 1:
        memo[1] = 0
        a_index += 1
a = list(set(a))
a.sort()
dfs(2,a_index)
#print(memo)
print(memo[n] % (10**9+7))


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)

def dfs(heights: int, a_index:int, a_n_1, a_n_2):
    if n < heights:
        return
    
    if m != 0 and a_index <= len(a) -1 and a[a_index] == heights:
        memo[2] = 0
        a_index += 1
        #print("10",heights)
    else:
        memo[2] = a_n_1 + a_n_2 #memo[1] + memo[0]
        #print("13",heights)
    dfs(heights+1,a_index,memo[2],a_n_1)
    return
    

n,m = list(map(int, input().split()))
memo = [1]*(3)
a = []
a_index = 0
if m != 0:
    for i in range(m):
        tmp = int(input())
        if i >= 1 and tmp -1 == a[len(a)-1]:
            print(0)
            sys.exit()
        else:
            a.append(tmp)
            #print(i,a)

    if a[0] == 1:
        memo[1] = 0
        a_index += 1
#a = list(set(a))
#a.sort()
dfs(2,a_index,memo[1],memo[0])
#print(memo)
print(memo[2] % (10**9+7))
n = int(input())
ans = 1
nums = map(int, input().split(' '))
for i in nums:
    ans *= i
if ans > 10**18:
    print(-1)
else:
    print(ans)

### FIXED CODE ###

a, b = map(int, input().split(' '))
print(a*b)