Harryxun/stf_run huggingface dataset:
k = int(input())
print((k+1) * (K // 2) / 2)

### FIXED CODE ###

#おそらく上は偶数の処理がおかしい
k = int(input())        
#奇数の場合
if (k%2) == 1:
    o = (k-1) * (k+1) / 8
    #eはoと同じ数値
    print(int(2*o))
#偶数の場合 
else:
    o = k * (k+2) / 8
    e = k * (k-2) / 8
    print(int(o+e))
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read() for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


N, K = read_ints()
S = '1' + read()
sum_0 = [0]

for s_new, s_next in zip(S[:-2], S[1:-1]):
    # print(s_new, s_next)
    if s_new == '1' and s_next == '0':
        sum_0.append(sum_0[-1] + 1)
    else:
        sum_0.append(sum_0[-1])

S = S[1:-1]
# print(sum_0)

left = 0  # 左端初期値
ans = 1  # 解初期値
right = 1

# right-leftが答え
# sum_0[right]-sum0[left]がKを超えたらleftを進める
# print(sum_0)
# しゃくとり法で溶けそうでは？
for left in range(N-1):
    while (True):
        right += 1
        if sum_0[right + 1] - sum_0[left] > K:
            right -= 1
            break
        if right == N - 1:
            break
        # print(left, right, sum_0[right + 1] - sum_0[left])

    # print(left, right)
    ans = max(ans, right - left+1)  # 大きい方に更新
    # print(ans)

print(ans)


### FIXED CODE ###

import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read() for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


N, K = read_ints()
S = read()[:-1]


# 偶数番目に0の個数を格納するようなデータ構造を構築する
num_cnts = []
now = '1'  # 0から考慮する
cnt = 0
for s in S:
    if s == now:
        cnt += 1
    if s != now:  # もしいまカウントしている文字と異なったらカウントを格納して、カウントをリセットする。
        num_cnts.append(cnt)
        now = s
        cnt = 1
num_cnts.append(cnt)
# もしSが0で終わっていたら0個の1を付け足す
if S[-1] == '0':
    num_cnts.append(0)

assert len(num_cnts) % 2 == 1, '奇数個じゃない！'

# 累積和で実装
from itertools import accumulate
num_accums = [0]+list(accumulate(num_cnts))

# 最大長の探索
add = min(2*K+1, len(num_cnts))  # Kで指定するよりも短い場合はそっちに合わせる
ans = 1

# print(num_cnts)
for left in range(0, len(num_cnts) - add+1, 2):
    right = left + add
    ans = max(ans, num_accums[right] - num_accums[left])
    # print(left, right, ans)

print(ans)
a=list(input())
sum=0
for i in range(len(a)):
  sum+=1 if a[i]=="+" else sum-=1
print(sum)

### FIXED CODE ###

a=list(input())
sum=0
for i in range(len(a)):
  sum+=1 if a[i]=="+" else -1
print(sum)
s=int(input())
t=[]
for i in range(len(s)-2):
  a=s[i:i+2]
  t.append(abs(a-753))
print(min(t))

### FIXED CODE ###

s = input()
ans = 753
for i in range(len(s)):
    tmp = abs(753 - int(s[i:i+3]))
    if tmp < ans:
        ans = tmp
print(ans)
S = input()
c = S.count('A') 
if s == 3 or s == 0:
  print('No')
else:
  print('Yes')

### FIXED CODE ###

S = input()
c = S.count('A') 
if c == 3 or c == 0:
  print('No')
else:
  print('Yes')
def N(): return int(input())
def NM():return map(int,input().split())
def L():return list(NM())
def LN(n):return [N() for i in range(n)]
def LL(n):return [L() for i in range(n)]
n=N()
p=L()
ans=[[0]*(n+1) for i in range(n+1)]
for i in range(1,n+1):
    for j in range(1,n+1):
        ans[i][j]=min(i-1,j-1,n-i,n-j)
c=[[1]*(n+1) for i in range(n+1)]
def f(x,y):
    for i,j in [(1,0),(0,1),(-1,0),(0,-1)]:
        if 1<=x+i<=n and 1<=y+j<=n:
            if ans[x][y]+c[x][y]<ans[x+i][y+j]:
                ans[x+i][y+j]-=1
                f(x+i,y+j)
t=0
for i in p:
    y=i%n
    if y==0:
        y=n
    x=(i+n-1)//n
    c[x][y]=0
    t+=ans[x][y]
    f(x,y)
print(t)

### FIXED CODE ###

def N(): return int(input())
def NM():return map(int,input().split())
def L():return list(NM())
def LN(n):return [N() for i in range(n)]
def LL(n):return [L() for i in range(n)]
import sys
sys.setrecursionlimit(10**6)
n=N()
p=L()
size=(n+1)**2+1
ans=[0]*size
for i in range(1,n+1):
    for j in range(1,n+1):
        k=i*(n+1)+j
        ans[k]=min(i-1,j-1,n-i,n-j)
c=[1]*size
di=[-1,1,n+1,-n-1]
def f(k,i):
    if k+i>=size:
        return
    if ans[k]+c[k]<ans[k+i]:
        ans[k+i]-=1
        q.append(k+i)
t=0
for i in p:
    y=i%n
    if y==0:
        y=n
    x=(i+n-1)//n
    k=x*(n+1)+y
    c[k]=0
    t+=ans[k]
    q=[k]
    while q:
        k=q.pop()
        f(k,1)
        f(k,-1)
        f(k,n+1)
        f(k,-n-1)
print(t)
# D
import collections

def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)
def combination_count(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res
N = int(input())
A = list( map(int,input().split()))
c = dict(collections.Counter(A))
su = 0
for i in c.values():
    if (i >= 2):
        su += combinations_count(i, 2)

for i in A:
    if (c[i]  >= 3):
        print(su - combinations_count(c[i],2) + combinations_count(c[i]-1,2))
    elif (c[i] == 2):
        print(su - 1)
    else:
        print(su)

### FIXED CODE ###

# D
import collections

def combinations_count(n, r):
    return n*(n-1) // 2

N = int(input())
A = list( map(int,input().split()))
c = dict(collections.Counter(A))
su = 0
for i in c.values():
    if (i >= 2):
        su += combinations_count(i, 2)

for i in A:
    if (c[i]  >= 3):
        print(su - combinations_count(c[i],2) + combinations_count(c[i]-1,2))
    elif (c[i] == 2):
        print(su - 1)
    else:
        print(su)
n=int(input())
s=input()
r=s.count("R")
b=s.count("B")
if r>b:print("Yes")
else:print("No")

### FIXED CODE ###

hen=set(list(map(int,input().split())))
if len(hen)==1:
  print("Yes")
else:
  print("No")
import sys
from collections import defaultdict


def dfs(tree, p, cnt, visited):
    visited[p] = True
    cnt_here = cnt[p]
    for c in tree.get(p,1):
        if visited[c]:
            continue
        cnt[c] += cnt_here
        dfs(tree, c, cnt, visited)


def main():
    input = sys.stdin.buffer.readline
    n, q = map(int, input().split())
    tree = defaultdict(list)
    for _ in range(n - 1):
        a, b = map(int, input().split())
        tree[a].append(b)
        tree[b].append(a)
    tree = dict(tree)
    cnt = [0] * (n + 1)

    for _ in range(q):
        p, x = map(int, input().split())
        cnt[p] += x
    visited = [False] * (n + 1)
    dfs(tree, 1, cnt, visited)
    print(*cnt[1:])


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
from collections import defaultdict


def dfs(tree, p, cnt, visited):
    visited[p] = True
    cnt_here = cnt[p]
    for c in tree.get(p):
        if visited[c]:
            continue
        cnt[c] += cnt_here
        dfs(tree, c, cnt, visited)


def main():
    input = sys.stdin.buffer.readline
    sys.setrecursionlimit(10 ** 9)
    n, q = map(int, input().split())
    tree = defaultdict(list)
    for _ in range(n - 1):
        a, b = map(int, input().split())
        tree[a].append(b)
        tree[b].append(a)
    tree = dict(tree)
    cnt = [0] * (n + 1)

    for _ in range(q):
        p, x = map(int, input().split())
        cnt[p] += x
    visited = [False] * (n + 1)
    dfs(tree, 1, cnt, visited)
    print(*cnt[1:])


if __name__ == "__main__":
    main()
n = int(input())

F = []
P = []
for i in range(n):
    F.append(list(map(int, input().split())))
for i in range(n):
    P.append(list(map(int, input().split())))
ans = -10**9
for i in range(1, 1 << (10)):
    C = [0]*11
    for j in range(10):
        if i & 2**j:
            for k in range(n):
                if F[k][j]:
                    C[k] += 1
    current = 0
    for k in range(n):
        current += P[k][C[k]]
    ans = max(current, ans)
print (ans)

### FIXED CODE ###

n = int(input())

F = []
P = []
for i in range(n):
    F.append(list(map(int, input().split())))
for i in range(n):
    P.append(list(map(int, input().split())))
ans = -10**9
for i in range(1, 1 << (10)):
    C = [0]*n
    for j in range(10):
        if i & 2**j:
            for k in range(n):
                if F[k][j]:
                    C[k] += 1
    current = 0
    for k in range(n):
        current += P[k][C[k]]
    ans = max(current, ans)
print (ans)
N,Q=map(int,input().split())
graph=[[]for _ in range(N)]
point=[0]*N
for _ in range(N-1):
    a,b=map(int,input().split())
    graph[a-1].append(b-1)
for _ in range(Q):
    a,b=map(int,input().split())
    a=a-1
    point[a]=point[a]+b

def dfs(now,prev=-1):
    for i in graph[now]:
        if i==prev:
            continue
        point[i]=point[i]+point[now]
        dfs(i,now)
dfs(0)
print(*point)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 6)
def input():
    return sys.stdin.readline()[:-1]

N,Q=map(int,input().split())
graph=[[]for _ in range(N)]
point=[0]*N
for _ in range(N-1):
    a,b=map(int,input().split())
    graph[a-1].append(b-1)
    graph[b-1].append(a-1)
for _ in range(Q):
    a,b=map(int,input().split())
    a=a-1
    point[a]=point[a]+b

def dfs(now,prev=-1):
    for next in graph[now]:
        if next==prev:
            continue
        point[next]=point[next]+point[now]
        dfs(next,now)
dfs(0)
print(*point)
N = int(input())
L = list(map(int,input().split()))
print(L)


ans = 0

for i in range(len(L)):
    for j in range(i+1,len(L)):
        for k in range(j+1,len(L)):
            #print("L[i]:",L[i],"L[j]:",L[j],"L[k]:",L[k])
            if L[i]+L[j] > L[k] and L[j]+L[k] > L[i] and L[k]+L[i] > L[j] \
            and L[i] != L[j] and L[j] != L[k] and L[k] != L[i]:
                #print("L[i]:",L[i],"L[j]:",L[j],"L[k]:",L[k])
                ans += 1

prinr(ans)

### FIXED CODE ###

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



ans = 0

for i in range(len(L)):
    for j in range(i+1,len(L)):
        for k in range(j+1,len(L)):
            #print("L[i]:",L[i],"L[j]:",L[j],"L[k]:",L[k])
            if L[i]+L[j] > L[k] and L[j]+L[k] > L[i] and L[k]+L[i] > L[j] \
            and L[i] != L[j] and L[j] != L[k] and L[k] != L[i]:
                #print("L[i]:",L[i],"L[j]:",L[j],"L[k]:",L[k])
                ans += 1

print(ans)
from fractions import gcd

n = int(input())
ans = 1

for _ in range(n):
	i = int(input())
	ans = int((ans / gcd(ans, i)) * i)

print(ans)

### FIXED CODE ###

from fractions import gcd

n = int(input())
ans = 1

for _ in range(n):
	i = int(input())
	ans = ans // gcd(ans, i) * i

print(ans)
a=list(sort(list(int,input().split())))
if a==[1,4,7,9]:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

n= list(map(int,input().split()))
n.sort()
if 1 in n and 7 in n and 9 in n and 4 in n:
  print("YES")
else:
  print("NO")
import math
import sys
input = sys.stdin.readline
number, jump =input().rstrip().split()
number = int(number)
jump = int(jump)
scaffolding = input().rstrip().split()
scaffolding = list(map(int, scaffolding))
res = [math.inf * number]
res[0] =0 
test = [math.inf * number]
test[0] = 0

for i in range(number):
    for j in range(1,jump+1):
        if i-j < 0:break
        cost = abs(scaffolding[i]-scaffolding[i-j])
        test[j-1] = res[i-j] + cost
    
    res[i] = min(test)
    

print(res[number-1])




### FIXED CODE ###

import math
import sys
input = sys.stdin.readline
number, jump =input().rstrip().split()
number = int(number)
jump = int(jump)
scaffolding = input().rstrip().split()
scaffolding = list(map(int, scaffolding))
res = [0 for i in range(number)]
res[1] = abs(scaffolding[1]-scaffolding[0])
#test = [math.inf for k in range(jump)]
#test[0] = 0

for i in range(2, number):
    h=max(0,i-jump)
    res[i]=min(res[k]+abs(scaffolding[i]-scaffolding[k]) for k in range(h,i))   
    #res[i] = min(test)
    

print(res[number-1])
N = int(input())
sum = 0 
while(N != 0):
    sum += (N%10)
    N /= 10
if sum % 9 == 0:
    print('Yes')
else: 
  print('No')

### FIXED CODE ###

N = int(input())
sumN = sum(int(digit) for digit in str(N))
if sumN%9 == 0:
    print("Yes")
else:
    print("No")
S = input()

import sys
import copy

if len(S) == 26:
    if S == "zyxwvutsrqponmlkjihgfedcba":
        ans = "-1"
        print(ans)
        sys.exit()

    else:
        original = copy.copy(S)
        np = ""
        for i in range(0, len(S)-2):
            print(i)
            if S[i] < S[i+1]:
                np += S[i]

            else:
                i = i - 1
                for j in reversed(range(i, len(S))):
                    if S[i] < S[j]:
                        np = np[:-1] + S[j]
                        tmp = S[i]
                        S = S[:i-1] + S[j] + S[i+1:]
                        S = S[:j-1] + tmp + S[j+1:]
                        np += "".join(list(reversed(S[i+1:])))
                        break

        print("np", np)
        for b in range(0, 27):
            if np[b] != original[b]:
                print(np[:b+1])
                exit()

        print(S)

            
else:
    hist = set(S)
    for c in range(0, 27):
        cand = chr(c+ord('a'))
        if cand not in hist:
            print(S+cand)
            sys.exit()



### FIXED CODE ###

S = input()

# 1 <= |S| <= 26
# lowercase

import sys
import copy

def next_permutation(a):
    for i in reversed(range(len(a) - 1)):
        if a[i] < a[i + 1]:
            break
    else:
        return False

    j = next(j for j in reversed(range(i + 1, len(a))) if a[i] < a[j])
    a[i], a[j] = a[j], a[i]
    a[i + 1:] = reversed(a[i + 1:])
    return True

if len(S) == 26:
    sl = list(S)
    if next_permutation(sl):
        np = "".join(sl)
        for b in range(0, 26):
            if np[b] != S[b]:
                print(np[:b+1])
                exit()

    else:
        print(-1)
        exit()
else:
    hist = set(S)
    for c in range(0, 27):
        cand = chr(c+ord('a'))
        if cand not in hist:
            print(S+cand)
            sys.exit()
n = int(input())
A = list(input())
A_change={}
B = [A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z]
for i in A:
  for j in B:
    if i==j:
      A_change[i] = str(B[(B.index(j)+n)%26])
print(list(A_change.values()))

### FIXED CODE ###

n = int(input())
s = input()
ans = ""
for i in s:
  ans += chr(ord("A") + (ord(i)-ord("A")+n)%26)
print(ans)
def calc(N, A):
    _exist = False
    counter = {}
    for a in A:
        counter[a] = 1 + (counter[a] if a in counter else 0)
    keys = counter.keys()
    values = counter.values()
    d = max(values) - min(values)
    if (N % 3 == 0 and d == 0):
        _exist = keys[0] + keys[1] == keys[2]
    else:
        _exist = 0 in counter and counter[0] == N
    print('Yes' if _exist else 'No')


N = int(input())
A = [int(s) for s in input().split(' ')]
calc(N, A)

### FIXED CODE ###

def calc(N, A):
    _exist = False
    counter = {}
    for a in A:
        counter[a] = 1 + (counter[a] if a in counter else 0)
    if (N % 3 == 0 and len(counter) == 3):
        keys = list(counter.keys())
        values = list(counter.values())
        d = max(values) - min(values)
        _exist = d == 0 and keys[0] ^ keys[1] == keys[2]
    elif (N % 3 == 0 and len(counter) == 2):
        keys = list(counter.keys())
        values = list(counter.values())
        d = max(values) - min(values)
        _exist = d == N // 3 and (keys[0] == 0 or keys[1] == 0)
    else:
        _exist = 0 in counter and counter[0] == N
    print('Yes' if _exist else 'No')


N = int(input())
A = [int(s) for s in input().split(' ')]
calc(N, A)
X, Y = map(int, input().split())
X1 = int(X, 16)
X2 = int(Y, 16)

if X>Y:
    print(">")
else:
    print("<")

### FIXED CODE ###

X, Y = input().split()

if X>Y:
    print(">")
elif X==Y:
	print("=")
else:
    print("<")
from math import ceil
N, M = map(int, input().split())
A = list(map(int, input().split()))

# 2で割ったものに置き換え
A = [a // 2 for a in A]

# 各要素について、2で割り切れる回数が等しいかチェック
count_div_2 = None
for a in A:
    cnt = 0
    while a % 2 == 0:
        a //= 2
        cnt += 1

    if count_div_2 is None:
        count_div_2 = cnt
    elif cnt != count_div_2:
        print(0)
        exit()

# LCM計算
while len(A) > 1:
    a, b = A.pop(), A.pop()
    my_lcm = lcm(a, b)

    # Mを超えたlcmは意味がない
    if my_lcm > M:
        print(0)
        exit()

    A.append(my_lcm)


print(ceil(M // A[0] / 2))


### FIXED CODE ###

from math import ceil
from fractions import gcd

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

# 2で割ったものに置き換え
A = [a // 2 for a in A]


def lcm(x, y):
    return x*(y//gcd(x, y))


# 各要素について、2で割り切れる回数が等しいかチェック
count_div_2 = None
for a in A:
    cnt = 0
    while a % 2 == 0:
        a //= 2
        cnt += 1

    if count_div_2 is None:
        count_div_2 = cnt
    elif cnt != count_div_2:
        print(0)
        exit()

# LCM計算
while len(A) > 1:
    a, b = A.pop(), A.pop()
    my_lcm = lcm(a, b)

    # Mを超えたlcmは意味がない
    if my_lcm > M:
        print(0)
        exit()

    A.append(my_lcm)


print(ceil(M // A[0] / 2))
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import itertools

def solve(W, N, v):
    cache = {}
    def loop(i, w):
        if i == N:
            return (0, 0)
        if (i, w) in cache:
            return cache[i, w]
        cache[i, w] = loop(i + 1, w)
        if v[i][1] <= w:
            t = loop(i + 1, w - v[i][1])
            t = (t[0] + v[i][0], t[1] + v[i][1])
            if cache[i, w][0] < t[0] or cache[i, w][0] == t[0] and t[1] < cache[i, w][1]:
                cache[i, w] = t
        return cache[i, w]
    return loop(0, W)

for dn in itertools.count(1):
    W = int(input())
    if W == 0: break
    N = int(input())
    v = [tuple(map(int, input().split(','))) for _ in range(N)]
    optim = solve(W, N, v)
    print("Case %d:\n%d\n%d" % (dn, optim[0], optim[1]))

### FIXED CODE ###

import itertools

for dn in itertools.count(1):
    W = int(input())
    if W == 0: break
    N = int(input())
    d = [tuple(map(int, input().split(','))) for _ in range(N)]

    v = [0 for _ in range(W + 1)]
    for i in range(N):
        for j in range(W, d[i][1] - 1, -1):
            v[j] = max(v[j], v[j - d[i][1]] + d[i][0])
    print("Case %d:\n%d\n%d" % (dn, max(v), v.index(max(v))))
lst = list(map(int, input().split))
lst.sort()
if lst[0] + lst[1] == lst[2]:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

lst = list(map(int, input().split()))
lst.sort()
if lst[0] + lst[1] == lst[2]:
  print("Yes")
else:
  print("No")
import math
count = 0
n,d = map(int,input().split())
for i in range(n):
  x,y = map(int,input().split())
  if x**2+y**2 ** 0.5 <= d:
    count += 1
print(count)

### FIXED CODE ###

a, b = map(int, input().split())
if (a+b)%2 != 0: 
	print("IMPOSSIBLE")
else: 
	print((a + b) // 2)
N = int(input())
A = int(input())
B = int(input())

if N == 1:
  print("Hello World")
  
elif N == 2:
  print(A + B)

### FIXED CODE ###

N = int(input())

if N == 1:
  print("Hello World")
  
elif N == 2:
  A = int(input())
  B = int(input())
  print(A + B)
N, K = map(int, input().split())
S = list( input() )

count = 0
temp = S[1]

for i in range(0, len(S)-1):
    if S[i] == S[i+1]:
        count += 1
        
print( min(len(S)-1, count + 2*K) )

### FIXED CODE ###

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

if len(S) > 1:
    count = 0

    temp = S[1]

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

    print( min(len(S)-1, count + 2*K) )
else:
    print(0)
N, M = map(int, input().split())
a = set([int(input()) for i in range(M)])
n = [0] * N
n[0] = 1
n[1] = 2

#listの中をinで探すのはくっそ遅い
if N == 1:
    print(1)
    exit()
if 1 in a and 2 in a:
    print(0)
    exit()
if 1 in a:
    n[0] = 0
    n[1] = 1

for i in range(N - 2):
    if i + 3 in a:
        pass
    else:
        n[i + 2] = (n[i + 1] + n[i]) % 1000000007

print(n[N - 1])

### FIXED CODE ###

N, M = map(int, input().split())
a = set([int(input()) for i in range(M)])
n = [0] * (N + 1)
n[0] = 1
n[1] = 1

#listの中をinで探すのはくっそ遅い
if 1 in a:
    n[1] = 0

for i in range(2, N + 1):
    if i in a:
        continue
    else:
        n[i] = (n[i - 1] + n[i - 2]) % 1000000007

print(n[N])
import numpy as np;
from numba import jit
import warnings
from operator import mul
from functools import reduce
warnings.simplefilter('ignore')
    

if __name__ == '__main__':
    try:

        N = int(input())
        A = list(map(int, input().split()))
        ans = reduce(mul, A)
        if ans > 10 ** 18:
            print(-1)
        else:
            print(ans)
    except:
        if 0 in A:
            print(0)
        else:
            print(-1

### FIXED CODE ###

import numpy as np;




if __name__ == '__main__':
    a, b = map(int, input().split())
    print(a*b)
import numpy as np
n = int(input())
A=list(map(int, input().split()))


bit= np.array([[0]*60 for i in range(n)])
for i in range(n):
    a=A[i]
    j=1
    if a!=0:    
        while a//2>0:
            if a%2==1:
                bit[i][60-j]=1
                j+=1
                a=a//2
            else:
                j+=1
                a=a//2
        bit[i][60-j]=1
           
l=np.sum(bit,axis=0)           
xor=([n]*60-l)*l
    
#for j in range(60):
    #for i in range(n):
        #l+=bit[i][j]
    #xor[j]=l*(n-l)
    
L=10**9+7
ans=xor[0]
for j in range(60-1):
    ans=((2*ans)+xor[j+1])%L
print(ans)    

### FIXED CODE ###

def main():
    """"ここに今までのコード"""
 
n = int(input())
A = [int(a) for a in input().split()]
mod=10**9+7
 
ans=0
for i in range(60):
    l=sum([a%2 for a in A])
    ans=(ans+l*(n-l)*(2**i))%mod
    A=[a//2 for a in A]
    
 
#ans=xor[0]
#for j in range(60-1):
#    ans=((2*ans)+xor[j+1])%mod
print(int(ans)) 
 
if __name__ == '__main__':
    main()
n = int(input())
S = input().split()
q = int(input())
T = input().split()
cnt = 0

for i in range(len(S)):
    S[i]=int(S[i])
for i in range(len(T)):
    T[i]=int(T[i])
for i in range(len(S)):
    x=0
    left=0
    right=n
    while left<right and x==0:
        mid=int((left+right)/2)
        if S[i]==T[mid]:
            cnt+=1
            x+=1
        elif S[i]<T[mid]:
            right=mid
        else:
            left=mid+1
print(cnt)



### FIXED CODE ###

def binarySearch(array, key):
    left = 0
    right = len(array)
    while left < right:
        mid = int((left + right) / 2)
        if key == array[mid]:
            return True
        elif key > array[mid]:
            left = mid + 1
        elif key < array[mid]:
            right = mid
        else:
            print("ERROR")
    return False
 
 
n = int(input())
s = [int(x) for x in input().split()]
q = int(input())
t = [int(x) for x in input().split()]
a = [x for x in t if binarySearch(s, x)]
print(len(a))
import math

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


N, K = map(int, input().split())
x = combinations_count(N-1, 2)
if x < K:
    print('-1')
    quit()

h = []
for i in range(2,N+1):
    h.append(('1', str(i)))

hen = x-K
x = 2
y = 3
while hen > 0:
    h.append((x,y))
    y += 1
    if y > N:
        x += 1
        y = x+1
    hen -= 1

print(len(h))
for x,y in h:
    print(x,y)

### FIXED CODE ###

import math

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


N, K = map(int, input().split())
if N > 2:
    x = combinations_count(N-1, 2)
else:
    x = 0
if x < K:
    print('-1')
    quit()

h = []
for i in range(2,N+1):
    h.append(('1', str(i)))

hen = x-K
x = 2
y = 3
while hen > 0:
    h.append((x,y))
    y += 1
    if y > N:
        x += 1
        y = x+1
    hen -= 1

print(len(h))
for x,y in h:
    print(x,y)
N=int(N)
print( int(((1+N)*N)/2) )

### FIXED CODE ###

N=int(input())
print( int(((1+N)*N)/2) )