Harryxun/stf_run huggingface dataset:
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
cnt=0

if k - min([a[0], b[0]]) < 0:
  print(0)
  exit()

while k>0:
  if a[0] < b[0]:
    k -= a.pop(0)
  elif a[0] > b[0]:
    k -= b.pop(0)
  else:
    if a[1] < b[1]:
      k -= a.pop(0)
    else:
      k -= b.pop(0)
  cnt += 1

print(cnt)

### FIXED CODE ###

from itertools import zip_longest, count, accumulate
from bisect import bisect, bisect_left
 
def LIST(): return list(map(int, input().split()))
 
n, m, k = map(int, input().split())
a = [0] + list(accumulate(LIST()))
b = list(accumulate(LIST()))
 
num = 0
 
for i, a in enumerate(a):
    time_rest = k - a
    
    if time_rest < 0:
        continue
    
    num = max(num, i + bisect(b, time_rest))
 
print(num)
N = int(input())
A =[int(i) for i in input().split()]
b = [0]*N
for i in A:
  result[i-1]+=1
for i in range(N):
    print(b[i])


### FIXED CODE ###

N = int(input())
A =[int(n) for n in input().split()]
b = [0]*N
for i in A:
  b[i-1]+=1
for i in range(N):
  print(b[i])
a = list(map(int, input().split()))

print(math.ceil(a[0] / a[1]) * t)

### FIXED CODE ###

import math

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

print(math.ceil(a[0] / a[1]) * a[2])
import sys
c = 0
line = sys.stdin.readline():
while line:
    c += 1
    print 'Case %d: %s' %(c, int(line))
    line = sys.stdin.readline():

### FIXED CODE ###

c = 0
while True:
    a = int(raw_input())
    if a == 0: break
    c += 1
    print 'Case %d: %d' %(c, a)
mo=10**9+7
def fact(x):
  if x==0:
    return 1
  else:
    return x*fact(x-1)%mo
n,m=map(int,input().split())
if abs(n-m)>1:
  print(0)
elif m==n:
  print((2*fact(m)*fact(n))%mo)
else:
  print((fact(m)*fact(n))%mo)


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
mo=10**9+7
def fact(x):
  if x==0:
    return 1
  else:
    return x*fact(x-1)%mo
n,m=map(int,input().split())
if abs(n-m)>1:
  print(0)
elif m==n:
  print((2*fact(m)*fact(n))%mo)
else:
  print((fact(m)*fact(n))%mo)
x,y,z=map(int,input().split())

ans=x*y/2

print(int(k))

### FIXED CODE ###

x,y,z=map(int,input().split())

ans=x*y/2

print('{:.0f}'.format(ans))
s,w =map(input().split())
 
if s>w:
  print("safe")
else:
  print("unsafe")

### FIXED CODE ###

s,w =map(int,input().split())
 
if s>w:
  print("safe")
else:
  print("unsafe")
# coding: utf-8 
# Your code here!
import sys 
sys.setrecursionlimit(40000)

N,Q=map(int,input().split()) 

l=[[i] for i in range(N)] 

#print(l) 
def dfs(num,point,visited): 
    visited[num]=1 
    point+=plus[num] 
    
    ans[num]=point 
    while l[num][-1]!=num: 
        temp=l[num].pop(-1) 
        if visited[temp]==0: 
            dfs(temp,point,visited) 
            
    return 0 

for _ in range(N-1): 
    a,b=map(int,input().split()) 
    l[a-1].append(b-1) 
    l[b-1].append(a-1) 
    
ans=[0]*N 
plus=[0]*N 

for _ in range(Q): 
    p,x=map(int,input().split()) 
    plus[p-1]+=x 

dfs(0,0,[0]*N) 

print(*ans)


### FIXED CODE ###

# coding: utf-8
# Your code here!
#パクリゆるして
#グラフのようななにか

import sys
input=sys.stdin.readline
sys.setrecursionlimit(1000000)

from collections import deque


N,Q=map(int,input().split())

tree=[[]*(N+1) for i in range(N+1)]
point=[0]*(N+1)

for _ in range(N-1):
    a,b=map(int,input().split())
    tree[a].append(b)
    tree[b].append(a)
    
for _ in range(Q):
    p,x=map(int,input().split())
    point[p]+=x
#print(point)

d=deque([[1,0]])

while d:
    node,parent=d.popleft()
    point[node]+=point[parent]
    lis=tree[node]
    for child in lis:
        if child==parent:
            continue
        d.append([child,node])
    #print(d)

print(*point[1:])
N = int(input())
s = [input() for _ in range(N)]
 
import collections
sortedList = [''.join(sorted(x)) for x in s]
countNum = list(collections.Counter(sortedList).values())
 
import sys
sys.setrecursionlimit(100000)
 
nCr = {}
def cmb(n, r):
    if r == 0 or r == n: return 1
    if r == 1: return n
    if (n,r) in nCr: return nCr[(n,r)]
    nCr[(n,r)] = cmb(n-1,r) + cmb(n-1,r-1)
    return nCr[(n,r)]

count = 0
memo = [0]*10**4
for n in countNum:
    if n!=1:
        if memo[n] == 0:
            memo[n] = cmb(n, 2)
        count += memo[n]

print(count)

### FIXED CODE ###

N = int(input())
s = [input() for _ in range(N)]
 
import collections
sortedList = [''.join(sorted(x)) for x in s]
countNum = list(collections.Counter(sortedList).values())
 
import sys
sys.setrecursionlimit(100000000)
 
nCr = {}
def cmb(n, r):
    if r == 0 or r == n: return 1
    if r == 1: return n
    if (n,r) in nCr: return nCr[(n,r)]
    nCr[(n,r)] = cmb(n-1,r) + cmb(n-1,r-1)
    return nCr[(n,r)]
  
count = 0
memo = [0]*10**6
for n in countNum:
    if n!=1:
        if memo[n] == 0:
            memo[n] = cmb(n, 2)
        count += memo[n]
        
print(count)
# -*- coding: utf-8 -*-
"""
Created on Sat Sep 19 22:03:19 2020

@author: liang
"""

N, X, M = map(int,input().split())
mod_set = {X}
mod_lis = [X]
A = [0]*(10**6+1)
A[0] = X
#for i in range(1,N):
for i in range(1,min(10**6,N)):
    tmp = A[i-1]**2%M
    if tmp in mod_set:
        break
    A[i] = tmp
    mod_set.add(tmp)
    mod_lis.append(tmp)

j = mod_lis.index(tmp)
T = i - j
ans = 0
if T != 0:  
    ans += sum(mod_lis[:j])
    T_sum = sum(mod_lis[j:])
    """
    【切り捨て演算は必ず()をつけて先に計算】
    """
    ans += T_sum * ((N-j)//T)
    #print((N-j)//T, T_sum)
    T_lis = mod_lis[j:i]   
    ans += sum(T_lis[:(N-j)%T])
else:
    ans = sum(mod_lis)
#print(T_lis)
#print((N-j)%T)
#print(T_lis[:10])
print(ans)
#print(T_sum)
#print(sum(T_lis))


### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Sat Sep 19 22:58:03 2020

@author: liang
"""

N,X,M=map(int,input().split())
a = X
hist = [a]
indices = [-1]*M
indices[a] = 0
flag=0
for i in range(1,min(10**6,N)):
  a = a**2 % M
  if indices[a] != -1:
    idx = indices[a]
    flag=1
    break
  hist.append(a)
  indices[a] = i
  
if flag==0:
  print(sum(hist))
  exit()
  
cycle = hist[idx:]
margin = hist[:idx]
q,r = divmod((N-len(margin)),len(cycle))
ans = 0
ans += sum(margin)
ans += sum(cycle)*q
#print(q,sum(cycle))
ans += sum(cycle[:r])
#print(r)
#print(cycle[:10])
print(ans)
from string import ascii_uppercase


def actual(n, s):
    answer = ''

    for char in s:
        # mod 26 で 26パターンに分類できる。 `-13` はidx調整項
        old_ord = ord(char) % 26
        shift_n = n % 26
        idx_shift_n = old_ord + shift_n - 13

        answer += ascii_uppercase[idx_shift_n]

    return answer

n = int(input())
s = input()

print(actual(n, s))

### FIXED CODE ###

def actual(n, s):
    # 方針: 0->25 の世界で nだけシフトさせる → 65-90の世界に復元
    answer = ''

    ord_A = ord('A')

    for char in s:
        x = ord(char) - ord_A  # Aが0になるように初期化する
        y = (x + n) % 26  # mod 26 で 26パターンに分類できる
        z = y + ord_A  # 復元できるように補正する

        answer += chr(z)

    return answer


n = int(input())
s = input()
 
print(actual(n, s))
N,D = map(int , input().split()) #第二引数(この場合だと---)を第一引数に変換(この場合だとint型)に変換する
ans = 0

for i in N :
    x,y = map(int , input().split())
    if x**2 + y**2 <= D**2:
        ans += 1

print(ans)



### FIXED CODE ###

N,D = map(int , input().split()) #第二引数(この場合だと---)を第一引数に変換(この場合だとint型)に変換する
ans = 0

for i in range(N) :
    x,y = map(int , input().split())
    if x**2 + y**2 <= D**2:
        ans += 1

print(ans)
a, b, c = input()
d, e, f = input()
if a, b, c == d, e, f:
  print(3)
elif a == b and b == e:
  print(2)
elif b == e and c == f:
  print(2)
elif c == f and a == b:
  print(2)
elif a == d or b == e or c == f:
  print(1)
else:
  peint(0)

### FIXED CODE ###

s = input()
t = input()
 
count = 0
 
for i in range(3):
		if s[i] == t[i]:
			count += 1  
    
print(count)
S=input()
T=input()
ans=0
for i in range(3):
  if(S[i]==T[i])ans+=1
print(ans)

### FIXED CODE ###

S=input()
T=input()
ans=0
for i in range(3):
  if S[i]==T[i]:
    ans+=1
print(ans)
s = list(map(int, input().split('/')))
flag = 1
if s[0] > 2019:
    flag = 0
elif s[0] == 2019:
    if s[1] > 4:
        flag = 0

ans_list = ['TBD', 'Heisei']
print(ans[flag])


### FIXED CODE ###

strings = input().split('/')
s = list(map(int, strings))
flag = 1
if s[0] > 2019:
    flag = 0
elif s[0] == 2019:
    if s[1] > 4:
        flag = 0

ans_list = ['TBD', 'Heisei']
print(ans_list[flag])
n = int(input())

for _ in range(n):
    train = ''
    seq = input()
    for i in range(0, len(seq), 3):
        if i == 0:
            train += seq[i]
        if seq[i - 2] == '-' and train[-1] == seq[i - 3]:
            train = train + seq[i]
        if seq[i - 2] == '<' and train[0] == seq[i - 3]:
            train = seq[i] + train
    print(train)



### FIXED CODE ###

n = int(input())

for _ in range(n):
    train = ''
    seq = input()
    for i in range(0, len(seq), 3):
        if i == 0:
            train += seq[i]
        if seq[i - 2:i] == '->' and train[-1] == seq[i - 3]:
            train = train + seq[i]
        if seq[i - 2:i] == '<-' and train[0] == seq[i - 3]:
            train = seq[i] + train
    print(train)
n = int(input())
s = list(input(''))
a = ['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']
b = 0
for i in range(len(s)):
    for j in range(len(a)):
        if s[i] == a[j]:
            if j+n > len(a)-1:
                s[i] = a[j+n-len(a)]
                print(s)
                break
            else:
                s[i] = a[j+n]
                print(s)
                break
print(''.join(s))

### FIXED CODE ###

n = int(input())
s = list(input(''))
a = ['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']
b = 0
for i in range(len(s)):
    for j in range(len(a)):
        if s[i] == a[j]:
            if j+n > len(a)-1:
                s[i] = a[j+n-len(a)]
                break
            else:
                s[i] = a[j+n]
                #print(s)
                break
print(''.join(s))
n = int(input())
h = list(map(int, input().split()))
sum = 0
max = 0
for i in h:
    if max <= i:
        sum += 1
        max = i
print(sum)

### FIXED CODE ###

a,b = map(int, input().split())
if a == b:
    print(a*2)
elif a > b:
    print(a*2-1)
else:
    print(b*2-1)
h,w=map(int,input().split())
n=int(input())
lst=[]

for i in range(1,n+1):
  for j in range(i):
    lst.append(str(i))
    
ans=[[0]*w for i in range(h)]

for i in range(h):
  if i%2==0:
    for j in range(w):
      ans[i][j]=lst.pop()

  else:
    for j in range(w-1,-1,-1):
      ans[i][j]=lst.pop()

for i in ans:
  print(' '.join(i))

### FIXED CODE ###

h,w=map(int,input().split())
n=int(input())
a=list(map(int,input().split()))
lst=[]


for i in range(1,n+1):
  for j in range(a[i-1]):
    lst.append(str(i))

lst.reverse()
    
ans=[[0]*w for i in range(h)]

for i in range(h):
  if i%2==0:
    for j in range(w):
      ans[i][j]=lst.pop()

  else:
    for j in range(w-1,-1,-1):
      ans[i][j]=lst.pop()

for i in ans:
  print(' '.join(i))
a=input()
b=input()
c=input()
if a==b and b==c:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

abc=input().split()
if abc[0] == abc[1] and abc[1]==abc[2]:
    print("Yes")
else:
  print("No")
from collections import defaultdict, deque

n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n)]

if m % 2:
    print(-1)
    exit()

adj = [[] for _ in range(n + 1)]
for a, b in ab:
    adj[a].append(b)
    adj[b].append(a)

s = 1
dq = deque([s])
d = [-1] * (n + 1)
d[s] = 0
p = [-1] * (n + 1)
order = []
while dq:
    u = dq.popleft()
    order.append(u)
    for v in adj[u]:
        if d[v] == -1:
            d[v] = d[u] + 1
            p[v] = u
            dq.append(v)

out = [0] * (n + 1)
ans = []
for a, b in ab:
    if p[a] == b or p[b] == a:
        continue
    ans.append((a, b))
    out[a] ^= 1

for v in order[1:][::-1]:
    u = p[v]
    if out[v]:
        ans.append((v, u))
        out[v] ^= 1
    else:
        ans.append((u, v))
        out[u] ^= 1

for u, v in ans:
    print(u, v)


### FIXED CODE ###

from collections import deque

n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(m)]

if m % 2:
    print(-1)
    exit()

adj = [[] for _ in range(n + 1)]
for a, b in ab:
    adj[a].append(b)
    adj[b].append(a)

s = 1
dq = deque([s])
d = [-1] * (n + 1)
d[s] = 0
p = [-1] * (n + 1)
order = []
while dq:
    u = dq.popleft()
    order.append(u)
    for v in adj[u]:
        if d[v] == -1:
            d[v] = d[u] + 1
            p[v] = u
            dq.append(v)

out = [0] * (n + 1)
ans = []
for a, b in ab:
    if p[a] == b or p[b] == a:
        continue
    ans.append((a, b))
    out[a] ^= 1

for v in order[1:][::-1]:
    u = p[v]
    if out[v]:
        ans.append((v, u))
        out[v] ^= 1
    else:
        ans.append((u, v))
        out[u] ^= 1

for u, v in ans:
    print(u, v)
N = int(input())
A = list(map(int, input().split()))


def check(num):
	cnt = 0
	cond = True

	for i in range(N):
		if A[i] % num != 0:
			cnt += 1
		if cnt > 1:
			cond = False
			break

	return cond

def BinarySearch(s,l):
	if s == l:
		return s
	if s+1 == l:
		if check(l):
			return l
		elif check(s):
			return s

	center = s + (l-s)//2
	
	if check(center):
		return BinarySearch(center, l)
	else:
		return BinarySearch(s, center-1)

print(BinarySearch(0, max(A))

### FIXED CODE ###

import math

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

def division_enumeration(num):
	ans = []
	d = math.floor(float(num)**(1/2))
	for i in range(1,d+1):
		if num % i == 0:
			ans.append(i)
			ans.append(num//i)

	return ans

trgs = sorted(set(division_enumeration(A[0]) + division_enumeration(A[1])), reverse = True)

for trg in trgs:
	cnt = 0
	cond = True
	for i in range(N):
		if A[i] % trg != 0:
			cnt += 1
			if cnt > 1:
				cond = False
				break
	if not cond:
		continue
	
	ans = trg
	break

print(ans)
from bisect import *

N, D, A = map(int, input().split())
X = [0]
H = []
for _ in range(N):
    x, h = map(int, input().split())
    X.append(X[-1] + x)
    H.append(h)

Imos = [0]*N
cnt = 0
damage = 0
res = 0
for i in range(N):
    h = H[i] - damage
    x = X[i+1]
    if h > 0:
        cnt = h//A + (h%A!=0)
        p = bisect_left(X, x+2*D) - 1
        Imos[p] += cnt
        damage = damage - Imos[i]*A + cnt * A
        res += cnt
print(res)

### FIXED CODE ###

from bisect import *

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

data = []
for _ in range(N):
    x, h = map(int, input().split())
    data.append((x,h))
data.sort()

X = []
H = []
for x, h in data:
    X.append(x)
    H.append(h)

Imos = [0]*(N+1)
cnt = 0
damage = 0
res = 0
for i in range(N):
    damage -= Imos[i]*A
    h = H[i] - damage
    x = X[i]
    if h > 0:
        cnt = h//A + (h%A!=0)
        p = min(bisect_right(X, x+2*D)-1, N-1)
        Imos[p+1] += cnt
        damage = damage + cnt * A
        res += cnt
print(res)
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
totl=0
for i in range(n):
  m=min(b[i],max(a[i],a[i+1]))
  totl+=m
  del a[a.index(m)]
print(totl)
  


### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
cnt=0
for i in range(n):
  if b[i]-a[i]>0:
    cnt+=a[i]
    cnt+=min(b[i]-a[i],a[i+1])
    a[i+1]=max(a[i+1]-b[i]+a[i],0)
  else:
    cnt+=b[i]
print(cnt)
s = input()
    t = 'ABC' if s == 'ARC' else 'ARC'
    print(t)

### FIXED CODE ###

if __name__=='__main__':
    s = input()
    t = 'ABC' if s == 'ARC' else 'ARC'
    print(t)
a,b,c,x = map(int,[input() for i in range(4)]):
ans = 0
  
for i in range(a+1):
  for j in range(b+1):
    for f in range(c+1):
      if i*500 + j*100 + f*50 == x:
        ans +=1:
            
print(ans)

### FIXED CODE ###

a, b, c, x = map(int, [input() for i in range(4)])
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if i * 500 + j * 100 + k * 50 == x:
                ans += 1
print(ans)
print(int(n * (n-1) // 2))

### FIXED CODE ###

n = int(input())

print(int(n * (n-1) // 2))
import copy

def selection_sort(A,n):
    for i in range(n):
        minj = i
        for j in range(i,n):
            if A[j] < A[minj]:
                minj = j
        A[i],A[minj] = A[minj], A[i]
    return A

n = int(input())
r = [0]*n
for i in range(n):
    r[i] = input().split()

for i in range(n):
    if r[i][0] == "insert":
        root= int(r[i][1])
        key = i + 1
        break
    else:
        print()
        print()

left = []
right = []
for i in range(key, n):
    if r[i][0] == "insert" and int(r[i][1]) < root:
        left += [int(r[i][1])]
    elif r[i][0] == "insert" and int(r[i][1]) > root:
        right += [int(r[i][1])]
    elif r
        pre = [root]+ left + right
        a = copy.deepcopy(pre)
        print(pre)
        print("", *selection_sort(a,len(a)))
        print("", *pre)
        


### FIXED CODE ###

class Node():
    def __init__(self, key):
        self.key = key
        self.left = self.right = None
        
def insert(key):
    global root

    x = root
    y = None
    while x:x, y = x.left if key < x.key else x.right , x
    if y == None:root = Node(key)
    elif y.key < key:y.right = Node(key)
    else:y.left = Node(key)
        
        
def pre(node):
    if node == None:return
    print('',node.key, end = '');pre(node.left);pre(node.right)
    
def ino(node):
    if node == None:return
    ino(node.left);print('',node.key,end='');ino(node.right)


n = int(input())
root = None
for j in range(n):
    s, *i = input().split()
    if s[0] == 'i':insert(int(i[0]))
    else:
        ino(root);print();pre(root);print()
N = int(input())
S = [list(input()) for i in range(N)]

for l in range(N):
  S[l].sort()

ans = 0
for j in range(N):
  for k in range(j+1,N):
    if S[j][0] == S[k][0]:
      if S[j][N-1] == S[k][N-1]:
      if (''.join(S[j]) == ''.join(S[k])):
        ans += 1
           
           
print(ans)
           

### FIXED CODE ###

from operator import itemgetter
N = int(input())
S = [list(input()) for i in range(N)]

for l in range(N):
  S[l].sort()
  S[l] = ''.join(S[l]) 

S.sort()

X = []
p = 1

for j in range(N-1):
  if S[j] == S[j+1]:
    p +=1
  else:
    X.append(p)
    p = 1
X.append(p)


def comb(n):
  if n == 2: return 1
  else:
    return int(n*(n-1)/2)

ans = 0

for k in range(len(X)):
  ans += comb(X[k])

print(ans)
num = int(input())
word = input()

for i in range(num):
    print(word[i],end="")
    if i >= len(word):
        break

if len(word) > num:
    print("...")

### FIXED CODE ###

num = int(input())
word = input()

for i in range(num):
    print(word[i],end="")
    if i+1 >= len(word):
        break

if len(word) > num:
    print("...")
N=int(input())
mod=10**9+7
bikkuri=[1 for i in range(N+1)]
for i in range(N+1):
  bikkuri[i+1]=((i+1)*bikkuri[i])%mod
print(bikkuri[N])

### FIXED CODE ###

N=int(input())
mod=10**9+7
bikkuri=[1 for i in range(N+2)]
for i in range(N+1):
  bikkuri[i+1]=((i+1)*bikkuri[i])%mod
print(bikkuri[N])
n=int(input())
a=list(map(int,input().split()))
a=sorted(a)
b,c=0,0
for i in range(n):
    if i%2==0:
        b+=a[-i]
    else:
        c+=a[-i]
print(b-a)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
a=sorted(a)
b,c=0,0
for i in range(n):
    if i%2==1:
        b+=a[-i-1]
    else:
        c+=a[-i-1]
print(c-b)
n = input()
A = map(int, raw_input().split())
q = input()
M = map(int, raw_input().split())
    
def solve(i, m):
  if m=0:
    return True
  if i>=n or m>sum(A):
    return False
  res=solve(i+1,m) or solve(i+1,m-A[i])
  return res
    
    
for m in M:
  if solve(0,m):
    print"yes"
  else:
    print"no"

### FIXED CODE ###

n = input()
A = map(int, raw_input().split())
q = input()
M = map(int, raw_input().split())
    
def solve(i, m):
  if m==0:
    return True
  if i>=n or m>sum(A):
    return False
  res=solve(i+1,m) or solve(i+1,m-A[i])
  return res
    
    
for m in M:
  if solve(0,m):
    print"yes"
  else:
    print"no"
import numpy as np
input = sys.stdin.readline
R = int(input())
pi = np.pi

print(2*R*pi)

### FIXED CODE ###

import numpy as np
R = np.double(input())
print(2*R*np.pi)
A,B,C,D = map(int,input().split())
# a = [1] * A + [0] * B + [-1] * C
if (A+B+C) == D:
    
    a = 1 * A + 0 * B + (-1 * C)
    
elif (B >= (D-A)) and (C >= (D-A+B)):
    a = 1 * A + 0 * B + (-1 * (D-A+B))
    
elif A >= D:
    a = 1 * D
    
print(a)

### FIXED CODE ###

A,B,C,D = map(int,input().split())

if D > A:
 
    ancer = 1 * A + 0 * (D - A) + (-1 *(D - A - B))
    
else:
    ancer = 1 * D

print(ancer)
N = int(input())

n1 = N / 1.08

if round(n) == n:
    print(n)
else:
    print(":(")


### FIXED CODE ###

import math
N = int(input())

n1 = N / 1.08

if math.floor(math.floor(n1)*1.08) == N:
    print(math.floor(n1))
elif math.floor(math.floor(n1 + 1)*1.08) == N:
    print(math.floor(n1 + 1))
else:
    print(":(")
# D
import sys
import math


def main():
    a, b, x = map(int, sys.stdin.readline().strip().split())

    s = x / a
    if s >= a * b / 2:
        ans = math.atan(1 / (2 / a * (b - s / a)))
    else:
        ans = math.atan(2 * s / (b ** 2))
    print(90 - math.degrees(ans))


if __name__ == '__main__':
    main()

### FIXED CODE ###

# D
import sys
import math


# def main():
#     a, b, x = map(int, sys.stdin.readline().strip().split())
#
#     s = x / a
#     if s > a * b / 2:
#         ans = math.atan(a ** 2 / (2 * (a * b - s)))
#     else:
#         ans = math.atan(2 * s / (b ** 2))
#
#     print(90 - math.degrees(ans))

def main():
    a, b, x = map(int, sys.stdin.readline().strip().split())

    s = x / a
    if s > a * b / 2:
        ans = math.degrees(math.atan(2 * b / a - 2 * s / (a ** 2)))
        print(ans)
    else:
        ans = 90 - math.degrees(math.atan(2 * s / (b ** 2)))
        print(ans)


if __name__ == '__main__':
    main()
def main()
    x, y =[int(i) for i in input().split()]
    while y != 0 :
        x, y = y, x%y
    print(x)
    
if __name__ == '__main__':
    main()

### FIXED CODE ###

def main() :
    x, y = [int(i) for i in input().split()]
    while y != 0 :
        x, y = y, x%y

    print(x)

if __name__ == '__main__':
    main()
h,w = map(int , input().split())
alf = 'ABCDEFGHIJKLMN'
for i in range(h):
  for j,s in enumerate(input().split()):
    if s == 'snuke':
      print(alf[j] + str(i+1))

### FIXED CODE ###

h,w = map(int , input().split())
alf = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in range(h):
  for j,s in enumerate(input().split()):
    if s == 'snuke':
      print(alf[j] + str(i+1))
i = input()
 
r = int(i)
s = r * r * 3.14159265358979
l = 2 * r * 3.14159265358979
 
print(s, end = " ")
print(l)

### FIXED CODE ###

r = float(input())

s = r * r * 3.14159265358979
l = 2 * r * 3.14159265358979
 
print(s, end = " ")
print(l)
n = int(input())
A = list(map(int,input().split()))
A = sorted(A)
Alice_card = []
Bob_card = []
for i in range(n):
        if i%2 == 0:
                Alice_card.append(A[i])
        else:
                Bob_card.append(A[i])
Alice_total = sum(Alice_card)
Bob_total = sum(Bob_card)
print(abs(Alice_total - Bob_total))

### FIXED CODE ###

n = int(input()) % 500
a = int(input())
if a >= n:
    print('Yes')
else:
    print('No')
n,k = (int(x) for x in input().split())
for i in range(k,n+2):
    base = n*i -(i*(i-1)) +1
#    print(base)
    res = res+ base

resu = res%1000000007

print(resu)

### FIXED CODE ###

n,k = (int(x) for x in input().split())
res = 0
for i in range(k,n+2):
    base = n*i -(i*(i-1)) +1
    res = res+ base
resu = res%1000000007
print(resu)
team=input()
x=team[0]
flag=0
d=0
for i in range(len(team))
   if team[i]==x:
       flag+=1
   else:
        x=team[i]
        flag=0
   if flag==7:
       print("yes")
       d=1
       break
if d=0:
    print("no")

        
        
       


### FIXED CODE ###

n=int(input())
e=int(n/2)
if n%2:
	o=int(n/2+1)
else:
	o=int(n/2)
	
print (o*e)