Harryxun/stf_run huggingface dataset:
from collections import Counter

def counter(list_1):
	return reduce(lambda a,b:a*b,map(lambda x:x+1,list_1))

if __name__ == '__main__':
  N=input()
  S=list(input())
  answer=counter(s)
  print(answer)

### FIXED CODE ###

from collections import Counter
from functools import reduce
 
def counter(list_1):
	return ((reduce(lambda a,b:a*b,map(lambda x:x+1,list_1))-1)%(10**9+7))
  
N=input()
S=input()
answer=counter(Counter(S).values())
print(answer)
a,b=map(int,input().split())
c=list(map(int,input().split()))

d=[]
for i in range(a-b):
    d.append(sum(c[i:i+b]))

n=max(d)
print((n+b)/2)


### FIXED CODE ###

def cumsum(xs):
    result = [xs[0]]
    for x in xs[1:]:
        result.append(result[-1] + x)
    return result

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

if a==b:
    print((sum(c)+a)/2)
    exit()

d=[]

c=[(i+1)/2 for i in c]
n=cumsum(c)

m=[]
for i in range(0,a-b):
    m.append(n[i+b]-n[i])


print(max(m))
n,s = input().split()
print(s.count('ABC'))

### FIXED CODE ###

n = input()
s = input()
print(s.count('ABC'))
a = input().split(" ")
a[0] = int(a[0])
a[1] = int(a[1])
a[2] = int(a[2])
if a[0] > 0 and a[1] > 0:
  print("0 0")
else:
  if a[2] > a[0]:
    a[0] = 0
  a[2] = a[2] - a
  if a[2] > a[1]:
    a[1] = 0
  else: 
    a[1] = a[1] - a[2]
  print(str(a[0]) + " " + str(a[1]))

### FIXED CODE ###

a,b,k = map(int, input().split())
x = 0 if k > a else a - k
y = b if (k - a) <= 0 else (0 if (k - a) > b else b - (k - a))
print("{} {}".format(x,y))
#入力
S=input()

#処理
l=len(S)
t=0
X="AKIHABARA"
while len(S)!=0:
  if S[0]=="A":
    if S[0]==X[0]:
      S=S[1:]
      X=X[1:]
    else:
      t=1
      break
  else:
    if X[0]=="A":
      X=X[1:]
    else:
      if S[0]==X[0]:
      	S=S[1:]
      	X=X[1:]
      else:
        t=1
        break
        
if t==0:
  print("YES")
else:
  print("NO")
        
      

### FIXED CODE ###

#1
#入力
S=input()


#処理
import re
m=re.fullmatch(r'A?KIHA?BA?RA?',S)

if m==None:
    print("NO")
else:
    print("YES")
a, b = map(int, input().split())
l = [int(x) for x in input().split()]

l.sort()
i = a - 1

for x in range(b):
    l[i] = 0
    i -= 1

print(sum(l))

### FIXED CODE ###

a, b = map(int, input().split())
l = [int(x) for x in input().split()]

l.sort()
i = a - 1

for x in range(b):
    l[i] = 0
    i -= 1

    if i < 0:
        break

print(sum(l))
def resolve():
    N = int(input())
    import collections
    n_dict = collections.defaultdict(list)
    for i in range(N-1):
        u,v,w = map(int,input().split())
        n_dict[u-1].append((v-1,w))
        n_dict[v-1].append((u-1,w))

    color = [-1 for _ in range(N)]

    def paint(i,c):
        color[i] = c
        for n,w in n_dict[i]:
            if color[n] == -1:
                paint(n,c^1) if w % 2 != 0 else paint(n,c)
            else:
                return
        return
    for i in range(N):
        if color[i] == -1:
            paint(i,1)   
        print(color[i])
resolve()

### FIXED CODE ###

def resolve():
    N = int(input())
    import collections
    n_dict = collections.defaultdict(list)
    for i in range(N-1):
        u,v,w = map(int,input().split())
        n_dict[u-1].append((v-1,w))
        n_dict[v-1].append((u-1,w))

    color = [-1 for _ in range(N)]

    d = collections.deque()
    for i in range(N):
        if color[i] == -1:
            d.append((i,1))
        while d:
            j,c = d.pop()
            color[j] = c
            for n,w in n_dict[j]:
                if color[n] == -1:
                    d.append((n,c^1)) if w % 2 != 0 else d.append((n,c))
                else:
                    continue
        print(color[i])
resolve()
n,m = map(int,input().split())
listA=[] #appendのために宣言が必要
i=0
a=[]
b=[]
c=[]
while True:
    try:
        if(i%2==0):
          i=i+1
          a1,b1=(list(map(int,input().split())))
          a.append(a1)
          b.append(b1)
          #listA.append(list(map(int,input().split())))
        else:
          i=i+1
          c.append(list(map(int,input().split())))	
    except:
        break;
        #または、quit(),os.exit()をして止める。

#print(listA)
#print(a)
#print(b)
#print(*c)
#偶数はa,b
get_=[]
money=[]
kei=0
for i in range(m):
  get_.extend(c[i])
  kei=kei+a[i]
  if(len(list(set(get_)))==n):
    money.append(kei)
  
print(min(money))

### FIXED CODE ###

x,y = map(int,input().split())
 
#print(x,y)
 
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors
x_li=(make_divisors(x))
y_li=(make_divisors(y))
z_li=(list(set(x_li)&set(y_li)))
#print(z_li)
 
import math
count=1

def is_prime(n):
    if n == 1: return False
    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
 
    return True
for n in z_li:
  if(is_prime(n)==True):
    count=count+1
print(count)
N = int(input())
A = {}
a = [int(i) for i in input().split()]
for i in range(N):
    if a[i] in A:
        A[a[i]] += 1
    else:
        A[a[i]] = 1

ans = []
A = list(sorted(list(A.items()), reverse=True))
for i in range(N):
    if A[i][1] >= 2:
        ans.append(A[i][0])
    if A[i][1] >= 4:
        ans.append(A[i][0])

    if len(ans) == 2:
        print(ans[0]*ans[1])
        break
else:
    print(0)


### FIXED CODE ###

N = int(input())
A = {}
a = [int(i) for i in input().split()]
for i in range(N):
    if a[i] in A:
        A[a[i]] += 1
    else:
        A[a[i]] = 1

ans = []
A = list(sorted(list(A.items()), reverse=True))
for i in range(N):
    if A[i][1] >= 2:
        ans.append(A[i][0])
    if A[i][1] >= 4:
        ans.append(A[i][0])

    if len(ans) >= 2:
        print(ans[0]*ans[1])
        break
else:
    print(0)
N = int(input())
mod = 10 **9 + 7

def equal(item0, item1, delta = 10 ** (-20)):
    if abs(item0 - item1) < delta:
        return True
    else:
        return False
def bigger(item0, item1, delta = 10** (-20)):
    if item0 -item1 > delta:
        return True
    else:
        return False
bit = [1]
for k in range(N):
    bit.append(bit[-1]*2%mod)


AB = []
BA = []
zero = 0
from bisect import insort
for _ in range(N):
    A, B = map(int, input().split())
    if A*B == 0:
        if A == 0 and B == 0:
            zero += 1
        elif A == 0 and B != 0:
            AB = [0] + AB
        else:
            BA = [0] + BA
    elif A*B > 0:
        insort(AB, A/B)
    else:
        insort(BA, -B/A)
def make_count(list):
    k = 0
    lis = []
    while k < len(list):
        cnt = 1
        while k+1 < len(list):
            if list[k]==list[k+1]:
                cnt += 1
                k += 1
                continue
            else:
                break
        lis.append([list[k], cnt])
        k += 1
    return lis

AB = make_count(AB)
BA = make_count(BA)
from collections import deque
AB = deque(AB)
BA = deque(BA)
ans = 1 #all pattern
flag = True
pair = []
if len(AB) == 0:
    print(bit[N-zero]+zero-1)
    exit()
if len(BA) == 0:
    print(bit[N-zero]+ zero -1)
    exit()


while True:
    if flag:
        a = AB.popleft()
        b = BA.popleft()
    flag = False
    if a[0]== b[0]:
        pair.append([a[1], b[1]])
        if AB:
            a = AB.popleft()
        if BA:
            b = BA.popleft()
    elif a[0]>b[0]:
        if BA:
          	pair.append([0,b[1]])
            b = BA.popleft()
            continue
        elif AB:
          	pair.append([a[1],0])
            a = AB.popleft()
            continue
        else:
            break
    else:
        if AB:
          	pair.append([a[1], 0])
            a = AB.popleft()
            continue
        elif BA:
          	pair.append([0, b[1]])
            b = BA.popleft()
        else:
            break
ans = 1
for item in pair:
    ans *= pow(2, item[0], mod) + pow(2, item[1], mod) -1
    ans %= mod
ans += zero-1
ans %= mod
print(ans)




### FIXED CODE ###

from collections import defaultdict
from math import gcd
N = int(input())
MOD = 10**9 + 7
L = defaultdict(lambda: [0,0])
zero = 0
for _ in range(N):
    A, B = map(int, input().split())
    if A==0: d=B
    elif B==0: d=A
    else: d=gcd(A,B)
    if d != 0:
        A, B = A//d, B//d
        if A<0: A, B = -A, -B
        if B>0: L[(A,B)][0] += 1
        else: L[(-B,A)][1] += 1
    else: zero += 1

res = 1

for x,y in L.values():
    res *= pow(2,x,MOD) + pow(2,y,MOD) -1
    res %= MOD
print((res+zero-1)%MOD)
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import floyd_warshall

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()

def warshall_floyd(v_count: int, matrix: list) -> list:
    for i in range(v_count):
        for j, c2 in enumerate(row[i] for row in matrix):
            for k, (c1, c3) in enumerate(zip(matrix[j], matrix[i])):
                if c1 > c2+c3:
                    matrix[j][k] = c2+c3
    return matrix

A = [LIST() for _ in range(N)]
dist_matrix = warshall_floyd(N, A)

ans = 0
for i, j in combinations(range(N), 2):
    if A[i][j] != dist_matrix[i][j]:
        print(-1)
        break
    for k in range(N):
        if i == k or j == k:
            continue
        if A[i][k] + A[k][j] == A[i][j]:
            break
    else:
        ans += A[i][j]
else:
    print(ans)


### FIXED CODE ###

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()

def warshall_floyd(v_count: int, matrix: list) -> list:
    for i in range(v_count):
        for j, c2 in enumerate(row[i] for row in matrix):
            for k, (c1, c3) in enumerate(zip(matrix[j], matrix[i])):
                if c1 > c2+c3:
                    matrix[j][k] = c2+c3
    return matrix

A = [LIST() for _ in range(N)]
dist_matrix = warshall_floyd(N, deepcopy(A))

ans = 0
for i, j in combinations(range(N), 2):
    if A[i][j] != dist_matrix[i][j]:
        print(-1)
        break
    for k in range(N):
        if i == k or j == k:
            continue
        if A[i][k] + A[k][j] == A[i][j]:
            break
    else:
        ans += A[i][j]
else:
    print(ans)
def judge(s):
    ok = True
    n = len(s)
    m = (n - 1) // 2
    if (m == 0):
        ok = (s[0] == s[1])
    else:
        for i in range(m):
            if s[i] != s[(n-1)-i]:
                ok = False
                break
    return ok

def strong_judge(s):
    ok = judge(s)
    n = len(s)
    m = (n - 1) // 2
    kf = (m - 1) // 2
    kb = m + kf + 1
    sf = s[0:m]
    sb = s[(m + 1):n]
    if ok:
        ok = judge(sf) & judge(sb)
    return ok

s = str(input())

if (len(s) % 2 == 0):
    print("No")
else:
    if strong_judge(s):
        print("Yes")
    else:
        print("No")


### FIXED CODE ###

def judge(s):
    ok = True
    n = len(s)
    m = (n - 1) // 2
    if (n == 1):
        ok = True
    else:
        if (m == 0):
            ok = (s[0] == s[1])
        else:
            for i in range(m):
                if s[i] != s[(n-1)-i]:
                    ok = False
                    break
    return ok

def strong_judge(s):
    ok = judge(s)
    n = len(s)
    m = (n - 1) // 2
    kf = (m - 1) // 2
    kb = m + kf + 1
    sf = s[0:m]
    sb = s[(m + 1):n]
    if ok:
        ok = judge(sf) and judge(sb)
    return ok

s = str(input())

if ((len(s) % 2 == 0) or (len(s) > 99) or (len(s) < 3)):
    print("No")
else:
    if strong_judge(s):
        print("Yes")
    else:
        print("No")
table2 = {n:0 for n in "abcdefghijklmnopqrstuvwxyz"}
while True:
    x = input()
    if not x:
        break
    for i in x.lower():
        if i in table2:
            table2[i] += 1

for m,n in table2.items():
    print("{0} : {1}".format(m,n))

### FIXED CODE ###

s=''
while True:
    try:
        s += input().lower()
    except:
        break
 
alph = "abcdefghijklmnopqrstuvwxyz"
 
for a in alph:
    print("{} : {}".format(a, s.count(a)))
N, M = map(int, input().split())
broken_lst = []
for _ in range(M):
    broken_lst.append(int(input()))

counter_arr = [0]*(N+1)

if broken_lst[0] != 0:
    counter_arr[0] = 1
next_broken = -1
if len(broken_lst) != 0:
    next_broken = broken_lst.pop(0)
last_broken = -1

for i in range(0, N-1):
    flug = 0
    if i+1 == next_broken:
        flug = 1
#        print("p0", i, counter_arr)
    elif i+1 == last_broken:
        pass
#        print("p1",i, counter_arr)
    else:
        counter_arr[i+1] += counter_arr[i]
        counter_arr[i+1] %= 10**9 + 7
#        print("p2",i,  counter_arr)

    if i + 2 == next_broken:
        flug = 1
#        print("p3",i, counter_arr)
    else:
        counter_arr[i+2] += counter_arr[i]
        counter_arr[i+2] %= 10**9 + 7
#        print("p4",i, counter_arr)
    
    if flug == 1:
        last_broken = next_broken
        if len(broken_lst) != 0:
            next_broken = broken_lst.pop(0)

if last_broken != N - 1:
    counter_arr[-1] += counter_arr[-2]
counter_arr[-1] %= 10**9 + 7

print(counter_arr[-1])


### FIXED CODE ###

N, M = map(int, input().split())
broken_lst = []
for _ in range(M):
    broken_lst.append(int(input()))

counter_arr = [0]*(N+1)

counter_arr[0] = 1
next_broken = -1
if len(broken_lst) != 0:
    next_broken = broken_lst.pop(0)
last_broken = -1

for i in range(0, N-1):
    flug = 0
    if i+1 == next_broken:
        flug = 1
#        print("p0", i, counter_arr)
    elif i+1 == last_broken:
        pass
#        print("p1",i, counter_arr)
    else:
        counter_arr[i+1] += counter_arr[i]
        counter_arr[i+1] %= 10**9 + 7
#        print("p2",i,  counter_arr)

    if i + 2 == next_broken:
        flug = 1
#        print("p3",i, counter_arr)
    else:
        if i == 0 and len(broken_lst) != 0:
            if broken_lst[0] == 2 and next_broken == 1:
                continue
        counter_arr[i+2] += counter_arr[i]
        counter_arr[i+2] %= 10**9 + 7
#        print("p4",i, counter_arr)
    
    if flug == 1:
        last_broken = next_broken
        if len(broken_lst) != 0:
            next_broken = broken_lst.pop(0)

if last_broken != N - 1:
    counter_arr[-1] += counter_arr[-2]
counter_arr[-1] %= 10**9 + 7

print(counter_arr[-1])
N = int(input())
S, T = list(input().split())

for i in range(1,N-1):
    S.insert(i+2,T[i])

ans = "".join(S)
print(ans)

### FIXED CODE ###

N = int(input())
S, T = list(input().split())
S = list(S)
T = list(T)
j = 0
for i in range(0,N+N,2):
    S.insert(i+1,T[j])
    j +=1
print("".join(S))
N = input(int())

N = str(N)

sum = 0
for i in len(N):
  sum += N[i]

if sum % 9 ==0:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

N = int(input())

if N % 9 ==0:
  print('Yes')
else:
  print('No')
a,b = map(int, input().split(" ")

if a < b
 print("a<b")
elif a > b
 print("a>b")
else :
 print("a==b")

### FIXED CODE ###

a,b = map(int, input().split(" "))

if a < b : print("a < b")
elif a > b : print("a > b")
else : print("a == b")
a、b、c、d  =  map（int、input（）。split（））
if abs(a - c) <= d:
    print('Yes')
elif abs(a - b) <= d and abs(b - c) <=d:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

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

if d >= abs(a - c) or (d >= abs(a - b) and d >= abs(b - c)):
    print('Yes')
else:
    print('No')
Your code here!

input_line = input()
abk = input_line.split(" ") 
ABK = [int(n) for n in abk]


for i in range(ABK[2]):

    if ABK[0] > 0:
        ABK[0] -= 1

    elif ABK[1] > 0: 
        ABK[1] -= 1

    else:
        pass
print(ABK[0]," ",ABK[1])





### FIXED CODE ###


input_line = input()
abk = input_line.split(" ") 
ABK = [int(n) for n in abk]



if ABK[0] + ABK[1] <= ABK[2]:
    A = 0
    B = 0

elif ABK[0] <= ABK[2] and ABK[1] > ABK[2] - ABK[0]:
    A = 0
    B = ABK[1] -  (ABK[2] - ABK[0])

elif ABK[0] > ABK[2]:
    A = ABK[0] - ABK[2]
    B = ABK[1]

    
print(A," ",B)
N = int(input())
A = list(input().split())
A.sort()
d = []
ans = 0
while A:
    a = A.pop(0)
    f = 0
    for p in d:
        if a % p == 0:
            f = 1
            break
        else:
            d.append(a)
    if f == 0:
        if a ==A[0]:
            while a == A[0]:
                A.pop(0)
        else:
            ans += 1
print(ans)

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
A.sort()
d = {}
n = A[-1]
def makePrimeChecker(n):
    isPrime = [True] * (n + 1)
    i = 0
    for j in A:
        if i == j:
            isPrime[i] = False
            continue
        i = j
        if isPrime[i]:
            for j in range(i * 2, n + 1, i):
                isPrime[j] = False
    return isPrime
P = makePrimeChecker(n)
i = 0
ans = 0
for j in A:
    if i == j:
        continue
    else:
        i = j
        if P[i]:
            ans += 1
print(ans)
A, B = map(int, input().strip().split())
if A >= 13:
  return B
elif 6 <= A <= 12:
  return B // 2
else:
  return 0

### FIXED CODE ###

A, B = map(int, input().strip().split())
if A >= 13:
    print(B)
elif 6 <= A <= 12:
    print(B // 2)
else:
    print(0)
n = int(input())
xy = []
ans = []

for i in range(n):
    xin,yin = map(int,input().split())
    xy.append((xin,yin))

xy.sort(key=lambda x:x[1])
xy.sort(key=lambda x:x[0])

for i in range(n):
    for j in range(i,n):
        if( i==j ):
            continue
        t = (xy[i][0]-xy[j][0],xy[i][1]-xy[j][1])
        ans.append(t)

res = [ans.count(e) for e in ans]
print(n-max(res))

### FIXED CODE ###

n = int(input())
xy = []
ans = []

for i in range(n):
    xin,yin = map(int,input().split())
    xy.append([xin,yin])

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

xy.sort(key=lambda x:x[1])
xy.sort(key=lambda x:x[0])

for i in range(n):
    for j in range(n):
        if( i==j ):
            continue
        t = (xy[i][0]-xy[j][0],xy[i][1]-xy[j][1])
        ans.append(t)

res = [ans.count(e) for e in set(ans)]
print(n-max(res))
for i in range(len(S)):
    for j in range(i, len(S)):
        count = 0
        print(list(S[i:j+1]))
        for s in list(S[i:j+1]):
            if s in ['A', 'G', 'T', 'C']:
                count += 1
            else:
                if m <= count:
                    m = count
                count = 0
print(m)

### FIXED CODE ###

S = list(input())
m = 0
count = 0
for i in range(len(S)):
    for j in range(i, len(S)):
        count = 0
        #switch = False
        for s in list(S[i:j+1]):
            #print(s, list(S[i:j+1]), count)
            if s in ['A', 'G', 'T', 'C']:
                count += 1
            else:
                if m <= count:
                    m = count
                count = 0
                switch = True
            if m <= count:
                m = count


print(m)
import sys
from random import randint
input = sys.stdin.readline
sys.setrecursionlimit(2 * 10**6)


def inpl():
    return list(map(int, input().split()))


def count_v(last_d, C, S, t, d):
    ret = S[t - 1]
    last_d[t - 1] = d
    for i in range(len(last_d)):
        ret -= C[i] * (d - last_d[i])
    return ret


def count_v_virtual(last_d, C, S, t, d):
    ret = S[t]
    tmp = last_d[t]
    last_d[t] = d
    for i in range(len(last_d)):
        ret -= C[i] * (d - last_d[i])
    last_d[t] = tmp
    return ret


def get_diff_score(T, d, q, C, D, Ss):
    diff = 0
    original_t = T[d - 1]
    last_d_q = 0
    last_d_ori = 0
    for i in range(d):
        if T[i] == q:
            last_d_q = i + 1
        if T[i] == original_t and i < d - 1:
            last_d_ori = i + 1
    # print(d, q, original_t, last_d_q, last_d_ori)
    for i in range(d - 1, D):
        if T[i] == q:
            break
        diff += C[q - 1] * (d - last_d_q)
    # print(diff, C[q - 1])
    T[d - 1] = q
    for i in range(d - 1, D):
        if T[i] == original_t:
            break
        diff -= C[original_t - 1] * (d - last_d_ori)
    # print(C[original_t - 1], diff)
    diff += Ss[d - 1][q - 1] - Ss[d - 1][original_t - 1]
    return diff


def main():
    D = int(input())
    C = inpl()
    Ss = [inpl() for _ in range(D)]
    T = []
    last_d = [-1] * len(C)
    Contest = 26

    for d in range(D):
        tmp_t, tmp_v = -1, -float('inf')
        for i in range(Contest):
            tmp_score = count_v_virtual(last_d, C, Ss[d], i + 1, d)
            if tmp_score > tmp_v:
                tmp_v = tmp_score
                tmp_t = i
        last_d[tmp_t] = d
        T.append(tmp_t + 1)

    Cs = [i + 1 for i, c in enumerate(C)]
    Cs.sort(key=lambda x: C[x - 1])

    for _ in range(100):
        d, q = randint(1, D), randint(1, Contest)
        ori_q = T[d - 1]
        diff = get_diff_score(T, d, q, C, D, Ss)
        if diff < 0:
            T[d - 1] = ori_q

    for t in T:
        print(t)

    return


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(2 * 10**6)


def inpl():
    return list(map(int, input().split()))


def solve(D, C, S):
    return [1] * D


def main():
    D = int(input())
    C = inpl()
    S = [inpl() for _ in range(D)]
    ans = solve(D, C, S)

    print(*ans, sep='\n')
    return


if __name__ == '__main__':
    main()
A, B, C, = taple(map(int, input().split()))
if (A - B) >= C:
  	print(0)
else:
  	print(C - (A - B))


### FIXED CODE ###

A, B, C, = tuple(map(int, input().split()))
if (A - B) >= C:
  	print(0)
else:
  	print(C - (A - B))
def main():
    import sympy
    n = int(input())
    s = 0
    
    for i in range(1,n+1):
        s += i * len(sympy.divisors(i))
    print(s)

main()

### FIXED CODE ###

def main():
    a = int(input())
    print(a + pow(a,2) + pow(a,3))

main()
x1,y1,x2,y2 = map(int, input().split())
ylen = y2 - y1
xlen = x2 - x1

x3 = x2 - ylen
y3 = y2 + xlen
x4 = x3 - xlen
y4 = y3 - ylen

print(str(x3) + " " + str(y3) + " " + str(x4) + " " + str(y4)) 

### FIXED CODE ###

K = int(input())
 
if K % 2 == 0:
  answer = (K / 2)**2
else:
  answer = ((K + 1) / 2)**2 - ((K + 1) / 2)
 
print(int(answer))
import sys
sys.setrecursionlimit(10**7)
N = int(input())
ts = [int(input()) for _ in range(N)]

def gcd(a,b):
    if b == 0:
        return a
    return gcd(b,a%b)

def lcm(a,b):
    g = gcd(a,b)
    return a/g*b

l = 1
for t in ts:
    l = lcm(l,t)
    
print(l)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
N = int(input())
ts = [int(input()) for _ in range(N)]

def gcd(a,b):
    if b == 0:
        return a
    return gcd(b,a%b)

def lcm(a,b):
    g = gcd(a,b)
    return a * b // g

l = 1
for t in ts:
    l = lcm(l,t)
    
print(l)
N = int(input())
H = list(map(int, input().split()))

H.reverse()
ans = [0 for i in range(N-1)]
val = 0
for i in range(N-2):
  if H[i] <= H[i+1]:
    val +=1
  else:
    ans[i] = val
    val = 0

print(max(ans))

### FIXED CODE ###

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

H.reverse()
ans = 0
val = 0
for i in range(N-1):
    if H[i] <= H[i+1]:
        val +=1
        ans = max(ans,val)
        #print(ans)
    else:
        ans = max(ans,val)
        val = 0
        #print(ans)

#print(H)
print(ans)