Harryxun/stf_run huggingface dataset:
import math
a, b, c, d = map(int,input().split())
e = c*d//math.gcd(c,d)
l = [c,d,e]
l2 = [0,0,0]
for i in range(0,3):
    if a%l[i] == 0:
        l2[i] = b//l[i] - a//l[i] +1
    else:
        l2[i] = b//l[i] - a//l[i]
print(b-a+1 -l2[0] -l2[1] + l2[2])

### FIXED CODE ###

import fractions
a, b, c, d = map(int,input().split())
e = c*d//fractions.gcd(c,d)
l = [c,d,e]
l2 = [0,0,0]
for i in range(0,3):
    if a%l[i] == 0:
        l2[i] = b//l[i] - a//l[i] +1
    else:
        l2[i] = b//l[i] - a//l[i]
print(b-a+1 -l2[0] -l2[1] + l2[2])
import numpy as np

h, w, k = map(int, input().split())
grid = np.array([list(map(str, input().rstrip())) for _ in range(h)])

ans = 0
for i in np.array(list(product([0, 1], repeat=h)), np.bool):
    for j in np.array(list(product([0, 1], repeat=w)), np.bool):
        if np.any(i) and np.any(j):
            arr = grid[i].copy()
            arr = arr[:, j]
            arr = arr.flatten()
            if np.where(arr == "#")[0].shape[0] == k:
                ans += 1

print(ans)

### FIXED CODE ###

import numpy as np
from itertools import product

h, w, k = map(int, input().split())
grid = np.array([list(map(str, input().rstrip())) for _ in range(h)])

ans = 0
for i in np.array(list(product([0, 1], repeat=h)), np.bool):
    for j in np.array(list(product([0, 1], repeat=w)), np.bool):
        if np.any(i) and np.any(j):
            arr = grid[i].copy()
            arr = arr[:, j]
            arr = arr.flatten()
            if np.where(arr == "#")[0].shape[0] == k:
                ans += 1

print(ans)
a,b,c = int(input().split())
if b//a <= c:
    print(b//a)
else:
    print(c)

### FIXED CODE ###

a,b,c = map(int,input().split())
if b//a <= c:
    print(b//a)
else:
    print(c)
N=input(); print(N*(N-1)//2)

### FIXED CODE ###

N=int(input());print(N*(N-1)//2)
N=int(input())

##一万円まで
for N in 10000:
  if N % 1000 == 0：
  print(0)


### FIXED CODE ###

#! /usr/bin/python3

N = int(input())
1 <= N <= 10000

if N % 1000 == 0:
 print(0)
else:
  sen = N//1000
  sen2 = sen*1000
  atai = N-sen2
  atai2 = 1000-atai
  print(atai2)
S=str(input())
slice=S[6]
if int(slice) < 5 and S[5] ==0:
  print("Heisei")
  else:
    print("TBD")

### FIXED CODE ###

S=str(input())
slice6=S[6]
slice5=S[5]
if int(slice6) < 5 and int(slice5) ==0:
  print("Heisei")
else:
  print("TBD")
T,X=map(int,input.split())
print(T/X)

### FIXED CODE ###

T,X=map(int,input().split())
print(T/X)
n, m = map(int,input().split())
a = [-1]
for i in range(m):
    ai = int(input())
    a.append(ai)
a.append(n+1)

def factorial(x):
  if x == 0:
    return 1
  else:
    return (x%1000000007) * factorial(x-1)

def C(x,y):
    return factorial(x)//(factorial(x-y)*factorial(y))

def f(x):
    if x == 0:
        return 1
    else:
        ret = 0
        for i in range(x//2+1):
            ret += C(x-i,i)
            ret %= 1000000007
        return ret

b = []
for i in range(m+1):
    b.append(a[i+1]-a[i]-2)

ans = 1
if -1 in b:
    print(0)
else:
    for j in b:
        ans *= (f(j)%1000000007)
    print(ans%1000000007)

### FIXED CODE ###

n, m = map(int,input().split())
dp = [1]*(n+1)
a = []
for i in range(m):
    ai = int(input())
    a.append(ai)

for i in a:
    dp[i] = 0

for i in range(2,n+1):
    if dp[i] != 0:
        dp[i] = (dp[i-1] + dp[i-2]) % (10**9+7)

print(dp[n])
area= a *b
perimeter = 2*(a+b)
print(area, perimeter)


### FIXED CODE ###

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

print(a*b,(a+b)*2)
k = int(input())
print("ACL" * k

### FIXED CODE ###

print("ACL" * int(input()))
N, M = map(int, input().split())

H = input().split()
    
t_1 = [int(h) for h in H]

t_2 = []
    
for m in range(M):
      
    g = 0
    
    A, B = map(int, input().split())
    
    if t_1[A-1] > t_1[B-1]:
        
        g = t_1[A-1]
        f = t_1[B-1]
        
    
    else:
        
        g = t_1[B-1]
        f = t_1[A-1]
        
    if f in t_2:    
        t_2.remove(f)
            
    t_2.append(g)
    
print(len(set(t_2)))

### FIXED CODE ###

S = input()
if S=='ARC':
    print('ABC')
else:
    print('ARC')
if D/S<=T:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

info=input().split()
 
D=int(info[0])
S=int(info[1])
T=int(info[2])
 
if D/S<=T:
  print('Yes')
else:
  print('No')
N = int(input())
al = [int(input()) for _ in range(0, N)]
for a in al:
  el = filter(lambda x: x != a, al)
  if len(list(el)):
    print(max(el))
  else:
    print(a)

### FIXED CODE ###

N = int(input())
al = [int(input()) for _ in range(0, N)]

max_a = max(al)  
tmp_al = al[:]
tmp_al.remove(max_a)
snd_a = max(tmp_al)
  
for a in al:
  if a == max_a:
    print(snd_a)
  else:
    print(max_a)
n = int(input())
lst = [int(i) for i in input().split()]

flag = 0

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


if flag == 0:
    for i in range(0,len(lst)-1):
        if (lst[i] <= lst[i+1])&(flag==0):
            print(str(lst[i])+'<='+str(lst[i+1]))
            flag = 0
        else:
            flag = 1


print(lst)
if flag == 0:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

n = int(input())
lst = [int(i) for i in input().split()]

lst[0] -=1
for i in range(1,len(lst)):
    if (lst[i-1] != lst[i]) or (lst[i-1] > lst[i]):
        lst[i] -= 1

flag = 0
for i in range(len(lst)-1):
    if (lst[i] <= lst[i + 1]) & (flag==0):
        flag = 0
    else:
        flag = 1

if len(lst) == 1:
    flag = 1


if flag == 0:
    print('Yes')
else:
    if len(lst) == 1:
        print('Yes')
    else:
        print('No')
n=input()
n=n.replace('1','2')
n=n.replace('9','1')
print(n.replace('2','9')

### FIXED CODE ###

n=input()
n=n.replace('1','2')
n=n.replace('9','1')
print(n.replace('2','9'))
n = str(input())
tmp = len(n)
bai = 1
if int(n)%2:
    print(0)
else:
    ans = 0
    for i in range(1,tmp):
        if i == 1:
            ans += int(n[-1-i]) * bai
        elif i == 2:
            bai = 12
            ans += int(n[-1 - i]) * bai
        elif i == 3:
            bai = 124
            ans += int(n[-1 - i]) * bai
        elif i < 18:
            bai *= 10
            bai += 9
            ans += int(n[-1 - i]) * bai
        else:
            ans = 124999999999999995
print(ans)

### FIXED CODE ###

n = int(input())
if n%2:
    print(0)
else:
    tmp = 5
    ans = 0
    n //= 2
    while tmp <= n:
        ans += n//tmp
        tmp *= 5
    print(ans)
# -*- coding: utf-8 -*-

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

for i in range(N + 1):
    for j in range(N - i + 1):
        if i * 10000 + j * 5000 + (N - i - j) * 1000 == Y:
            print('{} {} {}'.format(i, j, N - i - j))
            exit()
print('-1 -1 -1')


### FIXED CODE ###

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

int(input())  # Skip
lst = list(map(int, input().split()))

lst_length = len(lst)
idx = max_distance = 0

while True:
    distance = 0
    current_height = lst[idx]
    for i in range(idx + 1, lst_length):
        idx = i
        if current_height >= lst[idx]:
            current_height = lst[idx]
            distance += 1
        else:
            break

        if max_distance < distance:
            max_distance = distance

    if idx == (lst_length - 1):
        if max_distance < distance:
            max_distance = distance
        break

print(max_distance)
a=int(input())
for x in range(int(a**0.5),0,-1):
	if a%x==0:
    d=int(a//x)
    break
print(d+x-2)


### FIXED CODE ###

a=int(input())
for x in range(int(a**0.5),0,-1):
  if a%x==0:
    b=int(a//x)
    break
print(b+x-2)
s,t=map(input().split())
a,b=map(int,input().split())
u=input()
if s==u:
  print(a-1,b)
else:
  print(a,b-1)

### FIXED CODE ###

s,t=input().split()
a,b=map(int,input().split())
u=input()
if s==u:
  print(a-1,b)
else:
  print(a,b-1)
from array import array

def main():
    n,K = map(int, input().split())
    h = list(map(int, input().split()))
    inf = 1<<60
    DP = [array("q", [inf]*(K+1)) for i in range(K+1)]
    DP[0][0] = 0
    for i in range(n):
        hi = h[i]
        nxt = [array("q", [inf]*(K+1)) for i in range(K+1)]
        for j in range(min(i+1, K+1)):
            for k in range(j+1):
                l = i-k-1
                if l<0:
                    left = 0
                else:
                    left = h[l]
                a = hi-left if left<hi else 0
                nxt[j][0] = min(nxt[j][0], DP[j][k]+a)
                if j == K:
                    continue
                nxt[j+1][k+1] = min(nxt[j+1][k+1], DP[j][k])
        DP = nxt

    ans = float("inf")
    for i in DP:
        ans = min(ans, min(i))
    print(ans)

main()

### FIXED CODE ###

def main():
    n,K = map(int, input().split())
    h = list(map(int, input().split()))

    DP = [[float("inf")]*(K+1) for i in range(K+1)]
    DP[0][0] = 0
    for i in range(n):
        hi = h[i]
        nxt = [[float("inf")]*(K+1) for i in range(K+1)]
        for j in range(min(i+1, K+1)):
            for k in range(j+1):
                l = i-k-1
                if l<0:
                    left = 0
                else:
                    left = h[l]
                a = hi-left if left<hi else 0
                nxt[j][0] = min(nxt[j][0], DP[j][k]+a)
                if j == K:
                    continue
                nxt[j+1][k+1] = min(nxt[j+1][k+1], DP[j][k])
        DP = nxt

    ans = float("inf")
    for i in DP:
        ans = min(ans, min(i))
    print(ans)

main()
#AGC016-A
from collections import Counter 
s = input()
alphabet = "abcdefghijklmnopqrstuvwxyz"
cnt = 0
result = []
for i in alphabet:
    s_tmp = s 
    cnt = 0
    for k in range(len(s_tmp)):
        s_new= ""
        for j in range(len(s_tmp)-1):
            if s_tmp[j] == i or s_tmp[j+1] == i:
                s_new += i
            else:
                s_new += s_tmp[j]
        cnt += 1
        s_tmp = s_new
        if len(set(s_new)) == 1:
            result.append(cnt)
            break
            
 

#print(result)
print(min(result))



### FIXED CODE ###

#AGC016-A
from collections import Counter 
s = input()
alphabet = "abcdefghijklmnopqrstuvwxyz"

result = []
if len(set(s)) == 1:
    result.append(0)
for i in alphabet:
    s_tmp = s 
    cnt = 0
    for k in range(len(s_tmp)):
        s_new= ""
        for j in range(len(s_tmp)-1):
            if s_tmp[j] == i or s_tmp[j+1] == i:
                s_new += i
            else:
                s_new += s_tmp[j]
        cnt += 1
        if len(set(s_new)) == 1:
            result.append(cnt)
            break        

        s_tmp = s_new
        
            
 

#print(result)
print(min(result))
S=list(input())
i=0
while i!=len(S):
    if S[i:i + 6] == ['e', 'r', 'a', 's', 'e', 'r']:
        i += 6
    elif S[i:i+5]==['e','r','a','s','e']:
        i+=5
    elif S[i:i+7]==['d','r','e','a','m','e','r'] and (len(S[i+7:])==7 or S[i+7]!='a'):
        i+=7
    elif S[i:i+5]==['d','r','e','a','m']:
        i+=5
    else:
        print('NO')
        exit()
print('YES')


### FIXED CODE ###

S=list(input())
i=0
while i!=len(S):
    if i+6<=len(S) and S[i:i + 6] == ['e', 'r', 'a', 's', 'e', 'r']:
        i += 6
    elif i+5<=len(S) and S[i:i+5]==['e','r','a','s','e']:
        i+=5
    elif i+7<=len(S) and S[i:i+7]==['d','r','e','a','m','e','r'] and (len(S[i:])==7 or (S[i+7]!='a')):
        i+=7
    elif i+5<=len(S) and S[i:i+5]==['d','r','e','a','m']:
        i+=5
    else:
        print('NO')
        exit()
print('YES')
# cook your dish here
n=int(input())
a=list(map(int,input().split()))
st=[]
for i in range(n):
    if i==0:
        st.append(a[i])
    else:
        if st[-1]>=a[i]:
            ans+=1
        else:
            st.append(a[i])

### FIXED CODE ###

# cook your dish here
n=int(input())
a=list(map(int,input().split()))
st=[]
ans=0
for i in range(n):
    if i==0:
        st.append(a[i])
        ans+=1
    else:
        if st[-1]>=a[i]:
            ans+=1
            st.append(a[i])
print(ans)
a = int(input())
b = int(input())
import math
if b < 10:
    c=a*10+b
else:
    c=a*100+b

d= int(math.sqrt(c))
if d**2 == c:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

from math import sqrt
a, b = input().split()
n = int(a+b)
if(int(sqrt(n))**2 == n):
    print("Yes")
else:
    print("No")
n,l=input().split()
lists=[]
for i in range n:
  lists.append(input())
lists.sort()
li=','.join(lists)
print(li)

### FIXED CODE ###

n,l=input().split()
lists=[]
n=int(n)
for i in range (0,n):
  lists.append(input())
lists.sort()
li=''.join(lists)
print(li)
s=input()
t=input()
i=0
x=0
while i<=2:
  i+=1
  if s[i]==t[i]:
    x+=1
        
print(x)    
    


### FIXED CODE ###

s=input()
t=input()
c=0
for i in range(3):
    if s[i]==t[i]:
        c+=1

print(c)
n, k = map(int, input().split())
ds = [[] for _ in range(n)] # ネタの種類t(<=n)別においしさdのリスト
for _ in range(n):
    t, d = map(int, input().split())
    t -= 1
    ds[t].append(d)

y0, y1 = [], []
for i in range(n):
    if len(ds[i]) == 0:
        continue
    ds[i].sort()    # 各ネタでおいしさのsort
    y1.append(ds[i][-1])    # 各ネタで最大のおいしさをpopしy1に追加
    ds[i].pop()
    y0.extend(ds[i])        # 各ネタで2番目以降のおいしさのリストをy0に追加
y0.sort(reverse=True)   # ネタの種類が増えないおいしさのリスト（各ネタで2番目以降）を降順sort
y1.sort(reverse=True)   # ネタの種類が増えるおいしさ（各ネタで最大）のリストを降順sort

ans = 0
Y = max(0, k-len(y0))   # Y: ネタの種類の最小値（kまで増やしながら貪欲するため）
X = 0
for i in range(Y):
    X += y1[i]      # Y個 ネタの種類が増えるおいしさ（各ネタで最大）を大きい順に加算
for i in range(k-Y):
    X += y0[i]    # k-Y個 ネタの種類が増えないおいしさを大きい順に加算

while True:
    ans = max(ans, X+Y*Y)
    if (Y>=k and Y>=len(y1)):   # Yをkまで増やしながら貪欲
        break
    X += y1[Y]      # ネタの種類が増えるおいしさ（各ネタで最大）を大きい順に1つ追加
    X -= y0[k-Y-1]  # ネタの種類が増えない大きさを小さい順に1つ除外
    Y += 1
print(ans)


### FIXED CODE ###

n, k = map(int, input().split())
ds = [[] for _ in range(n)] # ネタの種類t(<=n)別においしさdのリスト
for _ in range(n):
    t, d = map(int, input().split())
    t -= 1
    ds[t].append(d)

y0, y1 = [], []
for i in range(n):
    if len(ds[i]) == 0:
        continue
    ds[i].sort()    # 各ネタでおいしさのsort
    y1.append(ds[i][-1])    # 各ネタで最大のおいしさをpopしy1に追加
    ds[i].pop()
    y0.extend(ds[i])        # 各ネタで2番目以降のおいしさのリストをy0に追加
y0.sort(reverse=True)   # ネタの種類が増えないおいしさのリスト（各ネタで2番目以降）を降順sort
y1.sort(reverse=True)   # ネタの種類が増えるおいしさ（各ネタで最大）のリストを降順sort

ans = 0
Y = max(0, k-len(y0))   # Y: ネタの種類の最小値（kまで増やしながら貪欲するため）
X = 0
for i in range(Y):
    X += y1[i]      # Y個 ネタの種類が増えるおいしさ（各ネタで最大）を大きい順に加算
for i in range(k-Y):
    X += y0[i]      # k-Y個 ネタの種類が増えないおいしさを大きい順に加算

while True:
    ans = max(ans, X+Y*Y)
    if (Y>=k or Y>=len(y1)):   # Yをkまで増やしながら貪欲
        break
    X += y1[Y]      # ネタの種類が増えるおいしさ（各ネタで最大）を大きい順に1つ追加
    X -= y0[k-Y-1]  # ネタの種類が増えない大きさを小さい順に1つ除外
    Y += 1
print(ans)
N=input()
b={}
for i in range(N)
    a=int(input())
    b.append(a)
print(sum(b)-max(b)/2)

### FIXED CODE ###

l=int(input())
b=[int(input()) for i in range(l)]
print(sum(b)-max(b)//2)
s = input()
q = int(input())

for qi in range(q):
    command = input().split()

    a = command[1]
    b = command[2]
    if command[0] == 'print':
        print(s[a:b + 1])
    elif command[0] == 'reverse':
        s = s[:a] + reversed(s[a:b + 1]) + s[b + 1:]
    else:
        p = command[3]
        s = s[:a] + p + s[b + 1:]

### FIXED CODE ###

s = input()
q = int(input())

for qi in range(q):
    command = input().split()

    a = int(command[1])
    b = int(command[2])
    if command[0] == 'print':
        print(s[a:b + 1])
    elif command[0] == 'reverse':
        s = s[:a] + s[a:b + 1][::-1] + s[b + 1:]
    else:
        p = command[3]
        s = s[:a] + p + s[b + 1:]
R,G = map(int,input().split())
print((2*G)-R)


### FIXED CODE ###

R = int(input())
G = int(input())
print((2*G)-R)
A = [int(item) for item in input().split()]
N = A.pop()

print(' '.join([str(item) for item in A]))
for i in range(1, N):
    key = A[i]
    j = i - 1
    while j >= 0 and A[j] > key:
        A[j+1] = A[j]
        j = j - 1
    A[j+1] = key
    print(' '.join([str(item) for item in A]))

### FIXED CODE ###

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

print(' '.join([str(item) for item in A]))
for i in range(1, N):
    key = A[i]
    j = i - 1
    while j >= 0 and A[j] > key:
        A[j+1] = A[j]
        j = j - 1
    A[j+1] = key
    print(' '.join([str(item) for item in A]))
n = int(input())
h = list(map(int, input().split()))

def chmin(a, b):
    if a > b: return b
    else: return a

def rec(i):
    if dp[i] < INF:
        return dp[i]
    
    if i == 0:
        return 0

    res = INF
    res = chmin(res, rec(i - 1) + abs(h[i] - h[i - 1]))
    if i > 1:
        res = chmin(res, rec(i - 2) + abs(h[2] - h[i - 2]))
    dp[i] = res
    return dp[i]

INF = float('inf')
dp = [INF] * n
print(rec(n - 1))

### FIXED CODE ###

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

INF = 1 << 40
dp = [INF] * n
dp[0] = 0
dp[1] = abs(h[1] - h[0])
for i in range(1, n - 1):
	dp[i + 1] = min(dp[i-1] + abs(h[i+1] - h[i-1]), dp[i] + abs(h[i+1] - h[i]))

print(dp[-1])
list = []
indent = 0
memory = 9
for i in range(5):
  list.append(int(input()))
  if memory > list[i] % 10 and list[i] % 10 > 0:
  	indent = i
    memory = list[i] % 10
 
count = 0
for i in range(5):
  if i == indent:
    count += list[i]
  else:
    count += 10 * (int(list[i]/10) + 1)
 
print(count)

### FIXED CODE ###

import math

list = []
indent = 0
memory = 9
for i in range(5):
  list.append(int(input()))
  if memory > list[i] % 10 and list[i] % 10 > 0:
    indent = i
    memory = list[i] % 10

count = 0
for i in range(5):
  if i == indent:
    count += list[i]
  else:
    count += 10 * math.ceil(list[i]/10)

print(count)
from math import pi
r = float(input())
area = r * r * pi
cir = (r+r) * pi
pirnt(f'{(area):.6f} {(cir):.6f}')


### FIXED CODE ###

from math import pi
r = float(input())
area = r * r * pi
cir = (r+r) * pi
print(f'{(area):.6f} {(cir):.6f}')
import sys
import time
import math
import itertools as it
def inpl():
    return list(map(int, input().split()))
st = time.perf_counter()
# ------------------------------

N, M = inpl()
dp = [False] * (N+10)
ac = 0
wa = 0
for _ in range(M):
    p, S = input().split()
    p = int(p)
    if S == 'WA':
        if !dp[p]:
            wa += 1
    else:
        if !dp[p]:
            ac += 1
            dp[p] = True
print(ac, wa)


# ------------------------------
ed = time.perf_counter()
print('time:', ed-st, file=sys.stderr)


### FIXED CODE ###

import sys
import time
import math
import itertools as it
def inpl():
    return list(map(int, input().split()))
st = time.perf_counter()
# ------------------------------

N, M = inpl()
ac = [False] * (N+10)
wa = [0] * (N+10)

for _ in range(M):
    p, S = input().split()
    p = int(p)
    if S == 'WA':
        if not ac[p]:
            wa[p] += 1
    else:
        ac[p] = True

a = 0
w = 0
for i in range(N+10):
    if ac[i]:
        a += 1
        w += wa[i]

print(a, w)

# ------------------------------
ed = time.perf_counter()
print('time:', ed-st, file=sys.stderr)
#C

ans = []
x,n = map(int,input().split())
l = list(map(int,input().split()))

l.sort()


nl = [0] * 100


for i in l:
    nl[i] = i

if(not (n == 0)):

    mx = x+1
    if(mx < 100):
        for i in range(x+1,len(nl)+1):
            if( nl[i] ==  0):
                ans.append(mx)
                break
            mx = mx + 1
    
    
    mi = x - 1
    if(mi > 1):
        for i in range(x-1,1,-1):
            if( nl[i] ==  0):
                ans.append(mi)
                break
            mi = mi - 1

print(min(abs(n),abs(mi),abs(mx)))

### FIXED CODE ###

import sys

X, N = map(int,input().split())
p = list(map(int,input().split()))

for d in range(X + 1):
    for s in [-1, +1]:
        a = X + s * d
        if p.count(a) == 0:
            print(a)
            sys.exit(0)
import sys
H,W,d=map(int,input().split())
if d%2==1:
  l=W//4+1
  reg=list("RYGB"*l)
  for j in range(H):
    a=reg.pop(0)
    reg+=a
    print("".join(map(str,reg))[:W])
else:
  for i in range(H):
      ans = []
      for j in range(W):
          b1 = ((i+j) // d) % 2
          b2 = ((i-j) // d) % 2
          result += c[b1 * 2 + b2]
      print("".join(result))

### FIXED CODE ###

import sys
H,W,d=map(int,input().split())
if d%2==1:
  l=W//4+1
  reg=list("RYGB"*l)
  for j in range(H):
    a=reg.pop(0)
    reg+=a
    print("".join(map(str,reg))[:W])
else:
  for i in range(H):
      c="RYGB"
      ans = []
      for j in range(W):
          b1 = ((i-j) // d) % 2
          b2 = ((i+j) // d) % 2
          ans+= c[b1 * 2 + b2]
      print("".join(ans))
r=input()
print(3*r*r)

### FIXED CODE ###

n=int(input())
print(3*n*n)
N,K=map(int,input().split())
A=list(map(int,input().split()))
now=1
count=0
a=0
l=[1]
b=0
c=0
while a==0and count<K:
    now=A[now-1]
    count+=1
    if now in l:
        a=1
    else:
        l.append(now)
b=l.index(now)
c=count-b+1
if count==K:
    print(now)
else:
    n=int((K-b)/c)
    ncount=0
    while ncount <n:
        now=A[now-1]
        ncount+=1
    print(now)
    



### FIXED CODE ###

n,m,x=map(int,input().split())
a=[list(map(int,input().split()))for i in range(n)]
ans=[]
for bit in range(1<<n):
  total=0
  skill=[0]*m
  for i in range(n):
    if bit & (1<<i):
      total+=a[i][0]
      for j in range(m):
        skill[j]+=a[i][j+1]
  if all([k>=x for k in skill]):
    ans.append(total)
print(min(ans) if len(ans)!=0 else -1)
n=int(input())
b=list(map(int,input().split()))
count=1
temp=[b[0]]
for i in range(1,n):  
  if b[i]==min(b[i],temp):
    count=count+1
    temp=b[i]
print(count)

### FIXED CODE ###

n=int(input())
b=list(map(int,input().split()))
count=1
temp=b[0]
for i in range(1,n):  
  if b[i]==min(b[i],temp):
    count=count+1
    temp=b[i]
print(count)