CodeEff/ECCO huggingface dataset:
# Original solution
"""
author : halo2halo
date : 18,Oct,2019
"""

import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

N = int(readline().rstrip())
print((N**3))


# Optimized solution
"""
author : halo2halo
date : 9, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

A=int(read())
print((A**3))
# Original solution
def resolve():
    n = int(eval(input()))
    print((n**3))
resolve()

# Optimized solution
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    print((int(eval(input()))**3))
resolve()
# Original solution
N = int(eval(input()))

print((pow(N, 3)))

# Optimized solution
#input
N = int(eval(input()))

#output
print((pow(N, 3)))
# Original solution
from collections import Counter, defaultdict
import sys
sys.setrecursionlimit(10 ** 5 + 10)
# input = sys.stdin.readline
from math import factorial
import heapq, bisect
import math
import itertools


import queue
from collections import deque




def main():
    num = int(eval(input()))
    print((num ** 3))




if __name__ == '__main__':
    main()



# Optimized solution
a = int(eval(input()))
answer = a * a * a
print(answer)
# Original solution
n=int(eval(input()))
print((n**3))

# Optimized solution
n=int(eval(input()))

print((n*n*n))
# Original solution
n = int(eval(input()))
print((n*n*n))

# Optimized solution
n = int(eval(input()))
print((n**3))
# Original solution
n = int(eval(input()))
print(("{}".format(n**3)))

# Optimized solution
n = int(eval(input()))
print((n**3))
# Original solution
N=int(eval(input()))

print((N**3))

# Optimized solution
print((int(eval(input())) ** 3))
# Original solution
N = int(eval(input()))
print((N**3))

# Optimized solution
N=int(eval(input()))
print((N*N*N))
# Original solution
n=int(eval(input()))
print((n**3))

# Optimized solution
print((int(eval(input()))**3))
# Original solution
n = eval(input())
n = int(n)
typ = n ** 3
print(typ)

# Optimized solution
n = int(eval(input()))
print((n ** 3))
# Original solution
import math
def lazy_update(s, e, value):
    a = [(1, l+s, l+e, 1)]
    while a:
        k, s, e, depth = a.pop()
        l_end, r_end = k << (rank-depth), (k+1) << (rank-depth)
        mid = (l_end + r_end) // 2
        if s == l_end and e == r_end:
            lazy[k] = value
        else:
            if lazy[k] is not None:
                lazy[k<<1] = lazy[k]
                lazy[(k<<1)+1] = lazy[k]
                lazy[k] = None
            if s < mid:
                a.append((k<<1, s, min(mid, e), depth+1))
            if e > mid:
                a.append(((k<<1)+1, max(mid, s), e, depth+1))

def get_value(i):
    i += l
    for j in range(rank, -1, -1):
        n = lazy[i>>j]
        if n is not None:
            return n
    return tree[i]

n, q = list(map(int,input().split()))
l = 1 << math.ceil(math.log2(n))
tree = [2**31-1]*(2*l)
lazy = [None]*(2*l)
rank = int(math.log2(len(tree)))
ans = []
ap = ans.append

for _ in [None]*q:
    query = list(map(int, input().split()))
    if query[0] == 0:
        lazy_update(query[1], query[2]+1, query[3])
    else:
        ap(get_value(query[1]))

print(("\n".join((str(n) for n in ans))))

# Optimized solution
import math
def lazy_update(s, e, value):
    a = [(1, l+s, l+e, 1)]
    ap = a.append
    while a:
        k, s, e, depth = a.pop()
        l_end, r_end = k << (rank-depth), (k+1) << (rank-depth)
        mid = (l_end + r_end) // 2

        if s == l_end and e == r_end:
            lazy[k] = value
        else:
            child = k<<1
            if lazy[k] is not None:
                lazy[child] = lazy[k]
                lazy[child+1] = lazy[k]
                lazy[k] = None
            if s < mid:
                ap((child, s, (mid, e)[e<mid], depth+1))
            if e > mid:
                ap((child+1, (mid, s)[s>mid], e, depth+1))

def get_value(i):
    i += l
    for j in range(rank, -1, -1):
        n = lazy[i>>j]
        if n is not None:
            return n
    return tree[i]

n, q = list(map(int,input().split()))
l = 1 << math.ceil(math.log2(n))
tree = [2**31-1]*(2*l)
lazy = [None]*(2*l)
rank = int(math.log2(len(tree)))
ans = []
ap = ans.append

for _ in [None]*q:
    query = list(map(int, input().split()))
    if query[0] == 0:
        lazy_update(query[1], query[2]+1, query[3])
    else:
        ap(get_value(query[1]))

print(("\n".join((str(n) for n in ans))))
# Original solution
import math

INT_MAX = 2147483647
MAX = 100003
n,q=(int(x) for x in input().split())
b= int(math.sqrt(n))



def update(x_f):
    
    x = int(x_f)
    for i in range(int(x*b),min(n-1,int((x+1)*b-1))+1):a[i]=l[x]
    l[x]=-1
    return
 

if __name__=='__main__':
        
    a = [INT_MAX for i in range(n)]
    l = [-1 for i in range(n)]
    
    for j in range(q):
        t, *com = (int(x) for x in input().split())
        if t : 
            x = com[0]
            if l[int(x/b)] != -1:update(x/b)
            print((a[x]))
        else:
            x,y,z = com
            if l[int(x/b)] != -1:update(x/b)
            for i in range(x,min(y,int((x/b+1)*b-1))+1):a[i]=z
            for i in range(int(x/b+1),int(y/b)):l[i]=z
            if l[int(y/b)] != -1:update(y/b)
            for i in range(max(x,int(y/b**2)),y+1):a[i]=z

            




# Optimized solution
import math

INT_MAX = 2147483647
MAX = 100003
n,q= l = list(map(int, input().split()))
b= int(math.sqrt(n))



def update(x_f):
    
    x = int(x_f)
    for i in range(int(x*b),min(n-1,int((x+1)*b-1))+1):a[i]=l[x]
    l[x]=-1
    return
 

if __name__=='__main__':
        
    a = [INT_MAX for i in range(n)]
    l = [-1 for i in range(n)]
    
    for j in range(q):
        t = list(map(int, input().split()))
        if t[0] : 
            x = t[1]
            if l[int(x/b)] != -1:update(x/b)
            print(a[x])
        else:
            t0,x,y,z=t
            if l[int(x/b)] != -1:update(x/b)
            for i in range(x,min(y,int((x/b+1)*b-1))+1):a[i]=z
            for i in range(int(x/b+1),int(y/b)):l[i]=z
            if l[int(y/b)] != -1:update(y/b)
            for i in range(max(x,int(y/b**2)),y+1):a[i]=z
# Original solution
n=int(input())
s=[input() for _ in range(n)]
cnt=[[0]*26 for _ in range(n)]
for i in range(n):
    for j in range(len(s[i])):
        cnt[i][ord(s[i][j])-ord("a")]+=1
ans=""
for j in range(26):
    tmp=10**9
    for i in range(n):
        tmp=min(tmp,cnt[i][j])
    ans+=chr(j+ord("a"))*tmp
print(ans)

# Optimized solution
n = int(input())
s = [input() for _ in range(n)]
cnt = [[0] * 26 for _ in range(n)]
for i in range(n):
    for j in range(len(s[i])):
        cnt[i][ord(s[i][j]) - ord("a")] += 1
ans = ""
for j in range(26):
    cntmn = 10**9
    for i in range(n):
        cntmn = min(cntmn, cnt[i][j])
    ans += chr(j + ord("a")) * cntmn
print(ans)
# Original solution
def f(ls,m,s):
	global n
	count = 0
	if m > 0:
		for i in range(len(ls)):
			lls = ls[:]
			a = (n-m+1)*lls.pop(i)
			if s-a < 0:
				break
			else:
				count += f(lls,m-1,s-a)
		return count
	else:
		if s == 0:
			return 1
		else:
			return 0
			
ls = [i for i in range(10)]
while True:
	try:
		n,s = list(map(int, input().split()))
		print(f(ls,n,s))
	except:
		break

# Optimized solution
def mx(ls,m):
	global n
	sum = 0
	for i in range(m):
		sum += (n-i)*ls[-i-1]
	return sum
	
def f(ls,m,s):
	global n
	count = 0
	if m > 0:
		if mx(ls,m) < s: return 0
		for i in range(len(ls)):
			lls = ls[:]
			a = (n-m+1)*lls.pop(i)
			if s-a < 0:	break
			else: count += f(lls,m-1,s-a)
		return count
	else:
		return 1 if s == 0 else 0
			
ls = [i for i in range(10)]
while True:
	try:
		n,s = list(map(int, input().split()))
		print(f(ls,n,s))
	except:
		break
# Original solution
def mx(ls,m):
	global n
	sum = 0
	for i in range(m):
		sum += (n-i)*ls[-i-1]
	return sum

def mn(ls,m):
	global n
	sum = 0
	for i in range(m):
		sum += (n-i)*ls[i]
	return sum
	
def f(ls,m,s):
	global n
	count = 0
	if m > 0:
		if mx(ls,m) < s or mn(ls,m) > s: return 0
		for i in range(len(ls)):
			lls = ls[:]
			a = (n-m+1)*lls.pop(i)
			if s-a < 0:	break
			else: count += f(lls,m-1,s-a)
		return count
	else:
		return 1 if s == 0 else 0
			
ls = [i for i in range(10)]
while True:
	try:
		n,s = list(map(int, input().split()))
		print(f(ls,n,s))
	except:
		break

# Optimized solution
def mx(ls,m):
	global n
	sum = 0
	for i in range(m):
		sum += (n-i)*ls[-i-1]
	return sum

def mn(ls,m):
	global n
	sum = 0
	for i in range(m):
		sum += (n-i)*ls[i]
	return sum
	
def f(ls,m,s):
	global n
	count = 0
	if m > 0:
		vmx,vmn = mx(ls,m),mn(ls,m)
		if vmx < s or vmn > s: return 0
		elif vmx == s or vmn == s: return 1
		for i in range(len(ls)):
			lls = ls[:]
			a = (n-m+1)*lls.pop(i)
			if s-a < 0:	break
			else: count += f(lls,m-1,s-a)
		return count
	else:
		return 1 if s == 0 else 0
			
ls = [i for i in range(10)]
while True:
	try:
		n,s = list(map(int, input().split()))
		print(f(ls,n,s))
	except:
		break
# Original solution
def mx(ls,m):
	global n
	sum = 0
	for i in range(m):
		sum += (n-i)*ls[-i-1]
	return sum

def mn(ls,m):
	global n
	sum = 0
	for i in range(m):
		sum += (n-i)*ls[i]
	return sum
	
def f(ls,m,s):
	global n
	count = 0
	if m > 0:
		vmx,vmn = mx(ls,m),mn(ls,m)
		if vmx < s or vmn > s: return 0
		elif vmx == s or vmn == s: return 1
		for i in range(len(ls)):
			lls = ls[:]
			a = (n-m+1)*lls.pop(i)
			if s-a < 0:	break
			else: count += f(lls,m-1,s-a)
		return count
	else:
		return 1 if s == 0 else 0
			
ls = [i for i in range(10)]
while True:
	try:
		n,s = list(map(int, input().split()))
		print(f(ls,n,s))
	except:
		break

# Optimized solution
def mxmn(ls,m):
	global n
	s1,s2 = 0, 0
	for i in range(m):
		s1 += (n-i)*ls[-i-1]
		s2 += (n-i)*ls[i]
	return s1,s2

def f(ls,m,s):
	global n
	count = 0
	if m > 0:
		mx,mn = mxmn(ls,m)
		if mx < s or mn > s: return 0
		elif mx == s or mn == s: return 1
		for i in range(len(ls)):
			lls = ls[:]
			a = (n-m+1)*lls.pop(i)
			if s-a < 0:	break
			else: count += f(lls,m-1,s-a)
		return count
	else:
		return 1 if s == 0 else 0
			
ls = [i for i in range(10)]
while True:
	try:
		n,s = list(map(int, input().split()))
		print(f(ls,n,s))
	except:
		break
# Original solution
import sys
dp=[[[0]*331 for i in range((1<<10)+1)] for j in range(12)]
#dp[12][1025][340]
dp[0][0][0]=1
for i in range(10):
    for j in range(1<<10):
        for c in range(331):
            if dp[i][j][c]==0:
                continue
            for k in range(10):
                if (j>>k&1)==0:
                    dp[i+1][j|(1<<k)][(i+1)*k+c]+=dp[i][j][c]
ans=[[0]*331 for unused in range(12)]
for i in range(11):
    for j in range(1<<10):
        for c in range(331):
            ans[i][c]+=dp[i][j][c]
for line in sys.stdin.readlines():
    n,s=list(map(int,line.strip().split()))
    if s>330:
        print(0)
    else:
        print(ans[n][s])

# Optimized solution
import sys
dp=[[[0]*331 for i in range((1<<10)+1)] for j in range(12)]
#dp[12][1025][331]
dp[0][0][0]=1
for i in range(10):
    for j in range(1<<10):
        for c in range(331):
            if dp[i][j][c]==0:
                continue
            for k in range(10):
                if (j>>k&1)==0:
                    dp[i+1][j|(1<<k)][(i+1)*k+c]+=dp[i][j][c]
ans=[[0]*331 for unused in range(12)]
for i in range(11):
    for j in range(1<<10):
        for c in range(331):
            ans[i][c]+=dp[i][j][c]
for line in sys.stdin.readlines():
    n,s=list(map(int,line.strip().split()))
    if s>330:
        print(0)
    else:
        print(ans[n][s])
# Original solution
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (division, absolute_import, print_function,
                        unicode_literals)
from sys import stdin

def solve(li, n, s, total, cnt):
    for i in li:
        value = i * n + total
        if value > s:
            break
        if n > 1:
            a = li[:]
            a.remove(i)
            solve(a, n - 1, s, value, cnt)
        elif value == s:
            cnt[0] += 1

for line in stdin:
    n, s = (int(s) for s in line.split())

    cnt = [0]
    solve(list(range(10)), n, s, 0, cnt)
    print(cnt[0])

# Optimized solution
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (division, absolute_import, print_function,
                        unicode_literals)
from sys import stdin

def solve(li, n, s, total, cnt):
    for i in li:
        value = i * n + total
        if value > s:
            break
        if n - 1:
            subli = li[:]
            subli.remove(i)
            r = list(range(n - 1, 0, -1))
            minimum = value + sum(i * j for i, j in zip(r, subli))
            maximum = value + sum(i * j for i, j in zip(r, subli[::-1]))
            if minimum <= s <= maximum: 
                solve(subli, n - 1, s, value, cnt)
        elif value == s:
            cnt[0] += 1
            break

cnt = [0]
for line in stdin:
    n, s = (int(s) for s in line.split())
    cnt[0] = 0

    solve(list(range(10)), n, s, 0, cnt)
    print(cnt[0])
# Original solution
import sys
from itertools import permutations

for line in sys.stdin:
    n, s = list(map(int, line.split()))
    count = 0
    for combi in permutations(list(range(10)), n):
        if sum(x * y for (x, y) in zip(list(range(1, 10)), combi)) == s:
            count += 1
    print(count)

# Optimized solution
import sys


def memoize(f):
    memo = {}

    def main(*args):
        if args in memo:
            return memo[args]
        result = memo[args] = f(*args)
        return result

    return main


def get_num(remains):
    i = 0
    while remains:
        if remains & 1:
            yield i
        i += 1
        remains >>= 1


@memoize
def calc(n, s, remains):
    if n == 1:
        if remains & (1 << s):
            return 1
        else:
            return 0
    if s <= 0:
        return 0

    return sum(calc(n - 1, s - n * m, remains ^ (1 << m)) for m in get_num(remains) if s - n * m >= 0)


for line in sys.stdin:
    n, s = list(map(int, line.split()))
    print((calc(n, s, (1 << 10) - 1)))
# Original solution
import sys
def f0070(A,n,s):
  if n==1: return (s in A)
  c=0
  A=sorted(A)
  A1=A[:n][::-1]
  A2=A[-n:]
  N=list(range(n))
  def f(A):
    return sum([(i+1)*A[i] for i in N])
  b1=f(A1)
  b2=f(A2)
  if b1<=s<=b2:
    for i in range(len(A)):
      b=s-A[i]*n
      c+=f0070(A[:i]+A[i+1:],n-1,b)
  return c
for a in sys.stdin:
  n,s=list(map(int,a.split()))
  print(f0070(list(range(10)),n,s))

# Optimized solution
import sys
def f0070(A,n,s):
  if n==1: return (s in A)
  c=0
  A=sorted(A)
  A1=A[:n][::-1]
  A2=A[-n:]
  N=list(range(n))
  def f(A):
    return sum([(i+1)*A[i] for i in N])
  if f(A1)<=s<=f(A2):
    for i in range(len(A)):
      b=s-A[i]*n
      c+=f0070(A[:i]+A[i+1:],n-1,b)
  return c
for a in sys.stdin:
  n,s=list(map(int,a.split()))
  print(f0070(list(range(10)),n,s))
# Original solution
import sys
def f0070(A,n,s):
  if n==1:
    if s in A:f=1
    else:f=0
    return f
  c=0
  A=sorted(A)
  A1=A[:n][::-1]
  A2=A[-n:]
  N=list(range(n))
  def f(A):
    return sum([(i+1)*A[i] for i in N])
  if f(A1)<=s<=f(A2):
    for i in range(len(A)):
      b=s-A[i]*n
      c+=f0070(A[:i]+A[i+1:],n-1,b)
  return c

for a in sys.stdin:
  n,s=list(map(int,a.split()))
  print(f0070(list(range(10)),n,s))

# Optimized solution
import sys
def f0070(A,n,s):
  if n==1:return s in A
  A=sorted(A)
  A1=A[:n][::-1]
  A2=A[-n:]
  N=list(range(n))
  b1=0
  b2=0
  c=0
  for i in N:
    b1+=(i+1)*A1[i]
    b2+=(i+1)*A2[i]
  if b1<=s<=b2:
    for i in range(len(A)):
      b=s-A[i]*n
      c+=f0070(A[:i]+A[i+1:],n-1,b)
  return c
for a in sys.stdin:
  n,s=list(map(int,a.split()))
  print(f0070(list(range(10)),n,s))
# Original solution
import sys
def f0070(A,n,s):
  if n==1:return s in A
  A=sorted(A)
  A1=A[:n][::-1]
  A2=A[-n:]
  N=list(range(n))
  b1=0
  b2=0
  c=0
  for i in N:
    b1+=(i+1)*A1[i]
    b2+=(i+1)*A2[i]
  if b1<=s<=b2:
    for i in range(len(A)):
      b=s-A[i]*n
      c+=f0070(A[:i]+A[i+1:],n-1,b)
  return c
for a in sys.stdin:
  n,s=list(map(int,a.split()))
  print(f0070(list(range(10)),n,s))

# Optimized solution
import sys
def f0070(A,n,s):
  if n==1:return s in A
  A=sorted(A)
  A1=A[:n][::-1]
  A2=A[-n:]
  b1=0
  b2=0
  c=0
  j=1
  for i in range(n):
    b1+=j*A1[i]
    b2+=j*A2[i]
    j+=1
  if b1<=s<=b2:
    for i in range(len(A)):
      c+=f0070(A[:i]+A[i+1:],n-1,s-A[i]*n)
  return c
for a in sys.stdin:
  n,s=list(map(int,a.split()))
  print(f0070(list(range(10)),n,s))
# Original solution
H, W = list(map(int, input().split()))
a = [input().strip() for _ in range(H)]
a = list(map(''.join, list(zip(*a))))
ans = 0
def solve(a, c):
    shift = [[0] * (H+1) for _ in range(H+1)]
    for i in reversed(range(H)):
        for j in reversed(range(H)):
            shift[i][j] = shift[i+1][j+1] + int(a[H-1-i] == c[H-1-j])
    dp = [[float('inf')] * (H+1) for _ in range(H+1)]
    for i in range(H+1):
        for j in range(H+1):
            b = []
            if i == j == 0:
                b.append(0)
            if i > 0:
                b.append(dp[i-1][j] + shift[i-1][j])
            if j > 0:
                b.append(dp[i][j-1] + shift[i][j-1])
            dp[i][j] = min(b)
    #print a, c, shift
    return dp[H][H]
for i in range(W-1):
    i1 = i
    i2 = i+1
    ans += solve(a[i1], a[i2])
print(ans)


# Optimized solution
H, W = list(map(int, input().split()))
a = [input().strip() for _ in range(H)]
a = list(map(''.join, list(zip(*a))))
ans = 0
def solve(a, c):
    shift = [[0] * (H+1) for _ in range(H+1)]
    for i in reversed(range(H)):
        for j in reversed(range(H)):
            shift[i][j] = shift[i+1][j+1] + int(a[H-1-i] == c[H-1-j])
    dp = [[float('inf')] * (H+1) for _ in range(H+1)]
    for i in range(H+1):
        for j in range(H+1):
            b = 2147483647
            if i == j == 0:
                b = 0
            if i > 0:
                b = min(b, dp[i-1][j] + shift[i-1][j])
            if j > 0:
                b = min(b, dp[i][j-1] + shift[i][j-1])
            dp[i][j] = b
    #print a, c, shift
    return dp[H][H]
for i in range(W-1):
    i1 = i
    i2 = i+1
    ans += solve(a[i1], a[i2])
print(ans)
# Original solution
n,m = list(map(int,input().split()))
a = [input().rstrip() for i in range(n)]
b = list(zip(*a))
for i in range(m):
  b[i] = "".join(b[i])
ans = 0
ct1 = [[0 for k in range(n-j+1)] for j in range(n+1)]
ct2 = [[0 for k in range(n-j+1)] for j in range(n+1)]
for i in range(m-1):
  b1 = b[i]
  b2 = b[i+1]
  for j in range(n+1):
    ct1[j][0] = 0
    ct2[j][0] = 0
    for k in range(n-j):
      ct1[j][k+1] = ct1[j][k]
      ct2[j][k+1] = ct2[j][k]
      if b1[k+j] == b2[k]:
        ct1[j][k+1] += 1
      if b2[k+j] == b1[k]:
        ct2[j][k+1] += 1
  dp = [[10**6 for i in range(n+1)] for j in range(n+1)]
  dp[0][0] = 0
  for i in range(n+1):
    for j in range(n+1):
      if i <= j:
        cost = ct2[j-i][n-j]
      else:
        cost = ct1[i-j][n-i]
      if i < n:
        dp[i+1][j] = min(dp[i+1][j],dp[i][j]+cost)
      if j < n:
        dp[i][j+1] = min(dp[i][j+1],dp[i][j]+cost)
  ans += dp[-1][-1]
print(ans)

# Optimized solution
n,m = list(map(int,input().split()))
a = [input().rstrip() for i in range(n)]
b = list(zip(*a))
for i in range(m):
  b[i] = "".join(b[i])
ans = 0
ct1 = [[0 for k in range(n-j+1)] for j in range(n+1)]
ct2 = [[0 for k in range(n-j+1)] for j in range(n+1)]
dp = [[10**5 for i in range(n+1)] for j in range(n+1)]
for i in range(m-1):
  b1 = b[i]
  b2 = b[i+1]
  for j in range(n+1):
    ct1[j][0] = 0
    ct2[j][0] = 0
    for k in range(n-j):
      ct1[j][k+1] = ct1[j][k]
      ct2[j][k+1] = ct2[j][k]
      if b1[k+j] == b2[k]:
        ct1[j][k+1] += 1
      if b2[k+j] == b1[k]:
        ct2[j][k+1] += 1
  dp[0][0] = 0
  for i in range(n+1):
    if i < n:
      dp[i+1][0] = 10**6
    for j in range(n+1):
      if i == 0 and j < n:
        dp[i][j+1] = 10**6
      if i <= j:
        cost = ct2[j-i][n-j]
      else:
        cost = ct1[i-j][n-i]
      if j < n:
        dp[i][j+1] = min(dp[i][j+1],dp[i][j]+cost)
      if i < n:
        dp[i+1][j] = dp[i][j]+cost
  ans += dp[-1][-1]
print(ans)
# Original solution
from math import sqrt
for i in range(int(eval(input()))):
    a, b = list(map(int, input().split()))
    if not a < b:
        a, b = b, a
    ans = (a-1)*2 + (a < b-1)
    c = int(sqrt(a*b))
    if c**2 == a*b:
        c -= 1
    if a < c:
        if (a*b) % c == 0:
            d = (a*b)//c - 1
        else:
            d = a*b//c
        ans += (c - a) * 2 - (c==d)
    print(ans)




# Optimized solution
# seishin.py
from math import sqrt
Q = int(eval(input()))
for i in range(Q):
    a, b = list(map(int, input().split()))
    if not a < b:
        a, b = b, a
    if a == b or a+1 == b:
        print((2*a-2))
        continue
    c = int(sqrt(a*b))
    if c**2 == a*b:
        c -= 1
    if c*(c+1) >= a*b:
        print((2*c-2))
        continue
    print((2*c-1))
# Original solution
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n = int(readline())
a = list(map(int,readline().split()))
s = a[0]+a[1]
if n == 2:
  if a[0] < a[1] or s%2 == 1:
    print((-1))
  else:
    print((a[0]-s//2))
  exit()
  
c = 0
for i in a[2:]:
  c ^= i

sc = (s-c)//2
if s < c or (s-c)%2 == 1 or c&sc != 0:
  print((-1))
  exit()

bb = a[0].bit_length()
x = ''
chk = 0
for i in range(bb-1,-1,-1):
  if (c>>i&1)|(sc>>i&1) == 0:
    x += '0'
  elif c>>i&1 == 0 and sc>>i&1 == 1:
    x += '1'
    chk += 2**i
  else:
    x += 'p'
    
if chk > a[0]:
  print((-1))
  exit()
  
for i in range(bb):
  if x[i] == 'p':
    if a[0] >= chk+2**(bb-1-i):
      chk += 2**(bb-1-i)
      
if chk == 0:
  print((-1))
else:
  print((a[0]-chk))

# Optimized solution
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n = int(readline())
a = list(map(int,readline().split()))
s = a[0]+a[1]
if n == 2:
  if a[0] < a[1] or s%2 == 1:
    print((-1))
  else:
    print((a[0]-s//2))
  exit()
  
c = 0
for i in a[2:]:
  c ^= i

sc = (s-c)//2
if s < c or (s-c)%2 == 1 or c&sc:
  print((-1))
  exit()

bb = a[0].bit_length()
x = ''
chk = 0
for i in range(bb-1,-1,-1):
  if not (c>>i&1)|(sc>>i&1):
    x += '0'
  elif not c>>i&1 and sc>>i&1:
    x += '1'
    chk += 2**i
  else:
    x += '?'
  
for i in range(bb):
  if x[i] == '?':
    if a[0] >= chk+2**(bb-1-i):
      chk += 2**(bb-1-i)

ans = a[0]-chk
print((ans if a[0] > ans >= 0 else -1))
# Original solution
import sys
sys.setrecursionlimit(10**7)

INF=10**18
def calc(a,b,xor):
  if (a&1)^(b&1)!=(xor&1):
    return INF
  if xor==0:
    if a<b:
      return INF
    else:
      return (a-b)//2
  x=2*calc(a//2,b//2,xor//2)
  y=2*calc((a-1)//2,(b+1)//2,xor//2)+1
  return min(x,y)

n=int(eval(input()))
arr=list(map(int,input().split()))
a,b=arr[0],arr[1]
xor=0
for i in range(2,n):
  xor^=arr[i]
ans=calc(a,b,xor)
if ans>=a:
  print((-1))
else:
  print(ans)

# Optimized solution
INF=10**18
def calc(a,b,xor):
  if (a,b,xor) in memo:
    return memo[(a,b,xor)]
  if (a&1)^(b&1)!=(xor&1):
    return INF
  if xor==0:
    if a<b:
      return INF
    else:
      return (a-b)//2
  x=2*calc(a//2,b//2,xor//2)
  y=2*calc((a-1)//2,(b+1)//2,xor//2)+1
  memo[(a,b,xor)]=min(x,y)
  return memo[(a,b,xor)]

n=int(eval(input()))
arr=list(map(int,input().split()))
a,b=arr[0],arr[1]
xor=0
for i in range(2,n):
  xor^=arr[i]
memo={}
ans=calc(a,b,xor)
if ans>=a:
  print((-1))
else:
  print(ans)