Harryxun/stf_run huggingface dataset:
import math
a,b = map(int, input().split())
print(a*b / math.gcd(a,b))

### FIXED CODE ###

import fractions
a,b = map(int, input().split())
def lcm(x,y):
    return x*y / fractions.gcd(x,y)
print(int(lcm(a,b)))
import sys
from bisect import *
from collections import *
from copy import deepcopy
from heapq import *
from itertools import *
from math import *
from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

def divisor(n):
    ass = []
    for i in range(1,int(n**0.5)+1):
        if n%i == 0:
            ass.append(i)
            if i**2 == n:
                continue
            ass.append(n//i)
    ass.sort()
    return ass

def main():
    """ main """
    A,B = map(int, input().split())
    ds = divisor(gcd(A,B))
    if len(ds) == 1:
        print(1)
        return 0
    ds = ds[1:]
    dp = [1]*len(ds)
    for i in range(len(ds)):
        if dp[i]:
            for j in range(i+1,len(ds)):
                if ds[j]%ds[i] == 0:
                    dp[j] = 0
    ans = 1
    for d in dp:
        if d == 1: ans += 1
    print(ans)

if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
from bisect import *
from collections import *
from copy import deepcopy
from heapq import *
from itertools import *
from math import *
from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline


def gcd(a, b):
    while b:
        a, b = b, a%b
    return a

def divisor(n):
    ass = []
    for i in range(1,int(n**0.5)+1):
        if n%i == 0:
            ass.append(i)
            if i**2 == n:
                continue
            ass.append(n//i)
    ass.sort()
    return ass

def main():
    """ main """
    A,B = map(int, input().split())
    ds = divisor(gcd(A,B))
    if len(ds) == 1:
        print(1)
        return 0
    ds = ds[1:]
    dp = [1]*len(ds)
    for i in range(len(ds)):
        if dp[i]:
            for j in range(i+1,len(ds)):
                if ds[j]%ds[i] == 0:
                    dp[j] = 0
    ans = 1
    for d in dp:
        if d == 1: ans += 1
    print(ans)

if __name__ == '__main__':
    main()
A = input(int())
if 30 <= A:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

A = int(input())
if 30 <= A:
    print("Yes")
else:
    print("No")
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 28 22:12:42 2020
"""

import sys
#import numpy as np

sys.setrecursionlimit(10 ** 9)
#def input():
#    return sys.stdin.readline()[:-1]
mod = 10**9+7



#N = int(input())
X, Y, A, B, C = map(int,input().split())
r = list(map(int,input().split()))
g = list(map(int,input().split()))
n = list(map(int,input().split()))

r.sort()
g.sort()
n.sort()

x, y = A-X, B-Y
z = C-1
ans = 0
ans += sum(r[x:])
ans += sum(g[y:])
#print(x,y,z,r[x],g[y],n[z],ans)
while (n[z] > r[x] or n[z] > g[y]) and z >= 0:
    if r[x] < g[y]:
        ans += (n[z] - r[x])
        x += 1
        z -= 1
    else:
        ans += (n[z] - g[y])
        y += 1
        z -= 1
#    print(x,y,z,r[x],g[y],n[z],ans)
print(ans)



### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Tue Apr 28 22:12:42 2020
"""

import sys
#import numpy as np

sys.setrecursionlimit(10 ** 9)
#def input():
#    return sys.stdin.readline()[:-1]
mod = 10**9+7

#N = int(input())
X, Y, A, B, C = map(int,input().split())
r = list(map(int,input().split()))
g = list(map(int,input().split()))
n = list(map(int,input().split()))

r.sort()
g.sort()
n.sort()

x, y = A-X, B-Y
z = C-1
ans = 0
ans += sum(r[x:])
ans += sum(g[y:])
g.append(10**10)
#print(x,y,z,r[x],g[y],n[z],ans)
while z >= 0:
#    print(x,y,z,r[x],g[y],n[z],ans)
    flg = True
    if x < A and r[x] < n[z] and r[x] < g[y]:
        ans += (n[z] - r[x])
        x += 1
        z -= 1
        flg = False
    elif y < B and g[y] < n[z]:
        ans += (n[z] - g[y])
        y += 1
        z -= 1
        flg = False
    if flg:
        break
#print(x,y,z,r[x],g[y],n[z],ans)
print(ans)
N,L = map(int,input().split())
a = [L+i for i in range(N)]
# print(a)

mn = 10*9
i = -1
for i in range(N):
  if mn > abs(a[i]):
    mn = abs(a[i])
    agmn = i
sm = 0
for i in range(N):
  if i!=agmn:
    sm += a[i]

# print(mn, agmn)
print(sm)

### FIXED CODE ###

N,L = map(int,input().split())
a = [L+i for i in range(N)]
# print(a)

mn = 10**9
for i in range(N):
  if mn > abs(a[i]):
    mn = abs(a[i])
    agmn = i

sm = 0
for i in range(N):
  if i!=agmn:
    sm += a[i]

# print(mn, agmn)
print(sm)
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import bisect


def solve():
    n, k = map(int, input().split())
    al = [int(i) for i in input().split()]

    ans = sum(abs(i) for i in al)
    flag0 = 0 in al
    if flag0:
        k -= 1
        n -= 1
        if k == 0:
            print(0)
            return
        al.remove(0)
    nc = bisect.bisect_left(al, 0)
    for i in range(n):
        if i < 0 or i + k - 1 >= n:
            break
        if al[i] < 0 and al[i + k - 1] < 0:
            t1 = min(abs(al[i], al[i + k - 1]))
        else:
            t1 = min(abs(al[i]) * 2 + abs(al[i + k - 1]),
                     abs(al[i]) + abs(al[i + k - 1]) * 2)
        if al[i] > 0 and al[i + k - 1] > 0:
            t2 = min(abs(al[i], al[i + k - 1]))
        else:
            t2 = min(abs(al[i]) * 2 + abs(al[i + k - 1]),
                     abs(al[i]) + abs(al[i + k - 1]) * 2)
        t = min(t1, t2)
        ans = min(ans, t)
    for i in range(n - 1, -1, -1):
        if i - k + 1 < 0 or i >= n:
            break
        if al[i] < 0 and al[i - k + 1] < 0:
            t1 = abs(al[i - k + 1], al[i])
        else:
            t1 = min(abs(al[i - k + 1]) * 2 + abs(al[i]),
                     abs(al[i - k + 1]) + abs(al[i]) * 2)
        if al[i] > 0 and al[i - k + 1] > 0:
            t2 = abs(al[i - k + 1], al[i])
        else:
            t2 = min(abs(al[i - k + 1]) * 2 + abs(al[i]),
                     abs(al[i - k + 1]) + abs(al[i]) * 2)
        t = min(t1, t2)
        ans = min(ans, t)
    print(ans)


if __name__ == "__main__":
    solve()


### FIXED CODE ###

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import bisect


def solve():
    n, k = map(int, input().split())
    al = [int(i) for i in input().split()]

    ans = sum(abs(i) for i in al)
    flag0 = 0 in al
    if flag0:
        k -= 1
        n -= 1
        if k == 0:
            print(0)
            return
        al.remove(0)
    nc = bisect.bisect_left(al, 0)
    for i in range(n):
        if i < 0 or i + k - 1 >= n:
            break
        if al[i] < 0 and al[i + k - 1] < 0:
            t1 = abs(al[i])
        else:
            t1 = min(abs(al[i]) * 2 + abs(al[i + k - 1]),
                     abs(al[i]) + abs(al[i + k - 1]) * 2)
        if al[i] > 0 and al[i + k - 1] > 0:
            t2 = abs(al[i + k - 1])
        else:
            t2 = min(abs(al[i]) * 2 + abs(al[i + k - 1]),
                     abs(al[i]) + abs(al[i + k - 1]) * 2)
        t = min(t1, t2)
        ans = min(ans, t)
    for i in range(n - 1, -1, -1):
        if i - k + 1 < 0 or i >= n:
            break
        if al[i] < 0 and al[i - k + 1] < 0:
            t1 = abs(al[i - k + 1])
        else:
            t1 = min(abs(al[i - k + 1]) * 2 + abs(al[i]),
                     abs(al[i - k + 1]) + abs(al[i]) * 2)
        if al[i] > 0 and al[i - k + 1] > 0:
            t1 = abs(al[i])
        else:
            t2 = min(abs(al[i - k + 1]) * 2 + abs(al[i]),
                     abs(al[i - k + 1]) + abs(al[i]) * 2)
        t = min(t1, t2)
        ans = min(ans, t)
    print(ans)


if __name__ == "__main__":
    solve()
S=input()
Q=int(input())
Query=[[j for j in input().split()] for i in range(Q)]

c=0
S0=list(S)

for i in range(Q):
    if Query[i][0]=='1':
        c=c+1
    else:
        if ((Query[i][1]=='1')and(c%2==0)) or ((Query[i][1]=='2')and(c%2==1)):
            S0.appendleft(Query[i][2])
        else:
            S0.append(Query[i][2])

if c%2==0:
    print(''.join(S0))
else:
    print(''.join(reversed(S0)))

### FIXED CODE ###

from collections import deque

S=input()
Q=int(input())
Query=[[j for j in input().split()] for i in range(Q)]

c=0
S0=deque(S)

for i in range(Q):
    if Query[i][0]=='1':
        c=c+1
    else:
        if ((Query[i][1]=='1')and(c%2==0)) or ((Query[i][1]=='2')and(c%2==1)):
            S0.appendleft(Query[i][2])
        else:
            S0.append(Query[i][2])

if c%2==0:
    print(''.join(S0))
else:
    print(''.join(reversed(S0)))
import numpy,math

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

if(len(s) <= n):
    print(s)
else:
    print(s[:n+1 + "..."])

### FIXED CODE ###

import numpy,math

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

if(len(s) <= n):
    print(s)
else:
    print(s[:n] + "...")
S = input()
    list_s = list(S)
    count = 0
if 1<len(list_s)<4
for i in range(2):
    if list_s[i] == 'R':
        count +=1
    elif list_s[i] == 'S':
        count = 0
print(count)

### FIXED CODE ###

S = input()
list_s = list(S)
count = 0
x = []
for i in range(3):
    if list_s[i] == 'R':
        count +=1
    elif list_s[i] == 'S':
        x.append(count)
        count = 0
x.append(count)
print(max(x))
x = int(input())
if x == 1:
  print(0,-1)
  exit()
  
def divisorize(fct):
    b, e = fct.pop()  # base, exponent
    pre_div = divisorize(fct) if fct else [[]]
    suf_div = [[(b, k)] for k in range(e + 1)]
    return [pre + suf for pre in pre_div for suf in suf_div]


def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


def num(fct):
    a = 1
    for base, exponent in fct:
        a = a * base**exponent
    return a

c = []
fct = factorize(x)
for div in divisorize(fct):
    c.append(num(div))
    
chk = False
for s in c:
  if chk:
    break
  for i in range(130):
    if (i+s)**5-i**5 > x:
      break
    if (i+s)**5-i**5 == x:
      ans = (i+s,i)
      chk = True
      break
  for p in range(1,130):
    j = -1*p
    #print(s,(j+s)**5-j**5)
    if (j+s)**5-j**5 > x:
      break 
    if (j+s)**5-j**5 == x:
      ans = (j+s,j)
      chk = True
      break 

print(*ans)

### FIXED CODE ###

x = int(input())
if x == 1:
  print(0,-1)
  exit()
  
def divisorize(fct):
    b, e = fct.pop()  # base, exponent
    pre_div = divisorize(fct) if fct else [[]]
    suf_div = [[(b, k)] for k in range(e + 1)]
    return [pre + suf for pre in pre_div for suf in suf_div]


def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


def num(fct):
    a = 1
    for base, exponent in fct:
        a = a * base**exponent
    return a

c = []
fct = factorize(x)
for div in divisorize(fct):
    c.append(num(div))
    
chk = False
for s in c:
  if chk:
    break
  for i in range(1000):
    if (i+s)**5-i**5 > x:
      break
    if (i+s)**5-i**5 == x:
      ans = (i+s,i)
      chk = True
      break
  if s <1000:    
    for p in range(s,1000):
      j = -1*p
      #print(s,(j+s)**5-j**5)
      if (j+s)**5-j**5 > x:
        break 
      if (j+s)**5-j**5 == x:
        ans = (j+s,j)
        chk = True
        break 
  for ww in range(1,(s+1)//2)[::-1]:
    jj = -1*ww
    if (jj+s)**5-jj**5 > x:
      break    
    if (jj+s)**5-jj**5 == x:
      ans = (jj+s,jj)
      chk = True
      break 
print(*ans)
import sys

W, H, x, y = list(map(int, sys.stdin.readline()))
b = 0

if x == W/2 and y == H/2:
    b = 1

print(str(W*H/2) + " " + str(b))


### FIXED CODE ###

import sys

W, H, x, y = list(map(int, sys.stdin.readline().strip().split(" ")))
b = 0

if x == W/2 and y == H/2:
    b = 1

print(str(W*H/2) + " " + str(b))
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N=int(readline())
m=map(int,read().split())
UVW=zip(m,m,m)

graph =[[] for i in range(N+1)]
for u,v,w in UVW:
    graph[u].append((v,w))
    graph[v].append((u,w))
color=[0]*(N+1)

def dfs(cur,par,dist):
    color[cur]=dist
    for dst,w in graph[cur]:
        if (dst==par):
            continue
        dfs(dst,cur,dist^(w&1))
dfs(1,-1,0)
print('\n'.join(map(str,color[1:])))


### FIXED CODE ###

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

N=int(readline())
m=map(int,read().split())
UVW=zip(m,m,m)

graph =[[] for i in range(N+1)]
for u,v,w in UVW:
    graph[u].append((v,w))
    graph[v].append((u,w))
color=[0]*(N+1)

def dfs(cur,par,dist):
    color[cur]=dist
    for dst,w in graph[cur]:
        if (dst==par):
            continue
        dfs(dst,cur,dist^(w&1))
dfs(1,-1,0)
print('\n'.join(map(str,color[1:])))
a = list(map(int,input().split()))

a.sort()
return(a[0]+a[1])

### FIXED CODE ###

a = [int(x) for x in input().split()]
a.sort()
print(a[0] + a[1])
a = input()
b = input()

ans1 = a * b
ans2 = 2 * ( a + b )

print (ans1 ans2)

### FIXED CODE ###

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

ans1 = a * b
ans2 = 2 * ( a + b )

print ans1 , ans2
import sys
x = [int(i) for i in sys.stdin.readlines()]

for t in x:
    i = t[0]
    p = t[1]
    if i == 0 and p == 0:
        break
    elif i < p:
        print(i p)
    elif i> p:
        print(p i)
    else:
        print(i p)

### FIXED CODE ###

import sys
   
while True:
    (x, y) = [int(i) for i in sys.stdin.readline().split(' ')]
   
    if x == 0 and y == 0:
        break
   
    if x > y:
        z = x
        x = y
        y = z
   
    print(x, y)
n, m = map(int, input().split())
friends = [[] for i in range(n)]


def dfs(i):
    ans[-1] += 1
    flg[i] = 1
    for j in friends[i]:
        if not flg[j]:
            dfs(j)
    return


for i in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    friends[a].append(b)
    friends[b].append(a)

flg = [0]*n
ans = []

for i in range(n):
    ans.append(0)
    if not flg[i]:
        dfs(i)

print(max(ans))


### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)

n, m = map(int, input().split())
friends = [[] for i in range(n)]


def dfs(i):
    ans[-1] += 1
    flg[i] = 1
    for j in friends[i]:
        if not flg[j]:
            dfs(j)
    return


for i in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    friends[a].append(b)
    friends[b].append(a)

flg = [0]*n
ans = []

for i in range(n):
    ans.append(0)
    if not flg[i]:
        dfs(i)

print(max(ans))
S = input()
K = int(input())

tmp = set()
for i in range(len(S)):
  for j in range(5):
    tmp.add(S[i:i+j])
print(sorted(tmp)[K])

### FIXED CODE ###

S = input()
K = int(input())
tmp = set()
for i in range(len(S)):
  for j in range(5):
    tmp.add(S[i:i+j+1])
print(sorted(tmp)[K-1])
S = [str(input()) for i in range(2*10^5)]
#(2*10^5):    
S.pop(0)
if '' in S:
    print(len(set(S))-1)
else:
    print(len(set(S)))

### FIXED CODE ###

N=int(input())
S = [str(input()) for i in range(N)]
print(len(set(S)))
s = [i for i in input()]
count = 1
s0 = s[0]
flag = 0
for i in range(1, len(s)):
    if flag==1:
        flag = 0
        continue
    if s0==s[i]:
        s0 = s[i] + s[i+1]
        flag = 1
    else:
        s0 = s[i]
    count += 1
print(count)

### FIXED CODE ###

s = [i for i in input()]
count = 1
s0 = s[0]
flag = 0
for i in range(1, len(s)):
    try:
        if flag==1:
            flag = 0
            continue
        if s0==s[i]:
            s0 = s[i] + s[i+1]
            flag = 1
        else:
            s0 = s[i]
        count += 1
    except:
        continue
print(count)
ss=input()
l=len(s)
if s=="1"*l:
    print("1")
else:
    i=0
    while True:
        if s[i]!="1":
            print(s[i])
            break
        i+=1


### FIXED CODE ###

import sys
s=input()
k=int(input())
if k<105:
    if s[:k]=="1"*k:
        print("1")
        sys.exit(0)
i=0
while True:
    if s[i]!="1":
        print(s[i])
        break
    i+=1
S = list('0'*13)
H = list('1'*13)
C = list('2'*13)
D = list('3'*13)
card_all = [S,H,C,D]

n = int(input())
for i in range(n):
    card = input().split()
    if card[0] == 'S':
        card_all[0][int(card[1])-1] = int(card[1])
    elif card[0] == 'H':
        card_all[1][int(card[1])-1] = int(card[1])
    elif card[0] == 'C':
        card_all[2][int(card[1])-1] = int(card[1])
    elif card[0] == 'D':
        card_all[3][int(card[1])-1] = int(card[1])
card_a = []
for ??? in card_all:
    s = 0
    for j in ???:
        s+=1
        if j == '0':
            print('S {}'.format(s))
        elif j == '1':
            print('H {}'.format(s))
        elif j == '2':
            print('C {}'.format(s))
        elif j == '3' :
            print('D {}'.format(s))

### FIXED CODE ###

cards = {
'S':[0 for i in range(13)],
'H':[0 for i in range(13)],
'C':[0 for i in range(13)],
'D':[0 for i in range(13)]
}
n = int(input())
for i in range(n):
    c, s = input().split()
    cards[c][int(s)-1] = int(s)
for i in ('S','H','C','D'):
    for j in range(13):
        if cards[i][j] == 0:
            print('{} {}'.format(i,j+1))
# Your code here!
I =int(input())


if I>=500:
    J=I//500
    
    K=J*500*2#
    
    
    P=I-500*J
    
    if P>=5:
        Q=P//5
        R=Q*5#
        
        A=K+R
print(A)

### FIXED CODE ###

# coding: utf-8
# Your code here!
I =int(input())


# if I ==0:
#     print(I)
    
if I>=500:
    J=I//500
    
    K=J*500*2#
    
    
    P=I-500*J
    if P==0:
        print(K)
    
    if P>=5:
        Q=P//5
        R=Q*5#
        
        A=K+R
        print(A)

if I<500:
        M=I//5
        A=M*5#
        
        
        print(A)
N, K = map(int, input().split())
INF = 10**9
h = [INF] * (2*N)
h[:N] = list(map(int, input().split()))
dp = [INF] * (2*N)
dp[0] = 0
for i in range(N):
    for k in range(1, K+1):
        dp[i+k] = min(dp[i+k], dp[i]+abs(h[i] - h[i+k]))
print(dp[N-1])

### FIXED CODE ###

N, K = map(int, input().split())
h = list(map(int, input().split()))
INF = 10**9
dp = [INF] * N
dp[0] = 0
for i in range(N):
    for k in range(1, K+1):
        if i + k < N:
            dp[i+k] = min(dp[i+k], dp[i]+abs(h[i] - h[i+k]))
print(dp[N-1])
import sys, math, copy
sys.setrecursionlimit(10**8)

def main():
    n = int(input())
    x = list(input())
    for i in range(n):
        x[i] = int(x[i])
    A0 = 0
    A1 = 0
    B = sum(x)
    for i in range(n):
        A0 += x[i]*pow(2,n-i-1,B+1)
        A1 += x[i]*pow(2,n-i-1,B-1)
        A0 %= B+1
        A1 %= B-1
    for i in range(n):
        if x[i] == 0:
            BB = B + 1
            AA = A0 + pow(2,n-i-1,BB)
        else:
            BB = B - 1
            AA = A1 - pow(2,n-i-1,BB)
        ans = 1
        while AA%BB != 0:
            AA = AA%BB
            AAA = AA
            BB = 0
            while AAA != 0:
                BB += AAA%2
                AAA //= 2
            ans += 1
        print(ans)
    
if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys, math, copy
sys.setrecursionlimit(10**8)

def main():
    n = int(input())
    x = list(input())
    for i in range(n):
        x[i] = int(x[i])
    A0 = 0
    A1 = 0
    B = sum(x)
    for i in range(n):
        if B+1 != 0:
            A0 += x[i]*pow(2,n-i-1,B+1)
            A0 %= B+1
        if B-1 != 0:
            A1 += x[i]*pow(2,n-i-1,B-1)
            A1 %= B-1
    for i in range(n):
        if x[i] == 0:
            BB = B + 1
            AA = A0 + pow(2,n-i-1,BB)
        else:
            BB = B - 1
            if BB == 0:
                AA = 0
            else:
                AA = A1 - pow(2,n-i-1,BB)
        ans = 1
        if BB == 0:
            print(0)
            continue
        while AA%BB != 0:
            AA = AA%BB
            AAA = AA
            BB = 0
            while AAA != 0:
                BB += AAA%2
                AAA //= 2
            ans += 1
        print(ans)
    
if __name__ == "__main__":
    main()
S = input()
K = int(input())
brob = 0
temp = 1
first = 0
for i in range(len(S)-1):
    if S[i] == S[i+1]:
        temp += 1
    else:
        if first == 0:
            first = temp
        brob += temp // 2
        temp = 1S = input()
K = int(input())
brob = 0
temp = 1
first = 0
for i in range(len(S)-1):
    if S[i] == S[i+1]:
        temp += 1
    else:
        if first == 0:
            first = temp
        brob += temp // 2
        temp = 1
        
brob += temp // 2
last = temp

if K == 1:
    print(brob)

else:
    if last == len(S):
        print(len(S) * K // 2)
    
    elif S[-1] != S[0]:
        print(brob * K)
    

    elif last % 2 and first % 2:
        print(brob * K + K - 1)

    else:
        print(brob * K)

        
brob += temp // 2
last = temp

if K == 1:
    print(brob)

else:
    if len(S) == 1:
        print(K // 2)
    
    elif S[-1] != S[0]:
        print(brob * K)

    elif last % 2 and first % 2:
        print(brob * K + K - 1)

    else:
        print(brob * K)


### FIXED CODE ###

S = input()
K = int(input())
brob = 0
temp = 1
first = 0
for i in range(len(S)-1):
    if S[i] == S[i+1]:
        temp += 1
    else:
        if first == 0:
            first = temp
        brob += temp // 2
        temp = 1
        
brob += temp // 2
last = temp

if K == 1:
    print(brob)

else:
    if last == len(S):
        print(len(S) * K // 2)
    
    elif S[-1] != S[0]:
        print(brob * K)
    

    elif last % 2 and first % 2:
        print(brob * K + K - 1)

    else:
        print(brob * K)
print(int(iinput())*3.1415)

### FIXED CODE ###

R = int(input())
py = 3.1415

print(2*R*py)
import math

n,k = map(int, input().split())

ans = 0
for i in range(1,n+1):
    x = max(0,math.ceil(math.log2(k/i)))
    ans += 0.5**x

print(ans/n)

### FIXED CODE ###

import math

n,k = map(int, input().split())

ans = 0
for i in range(1,n+1):
    x = max(0,math.ceil(math.log2(k/i)))
    ans += 0.5**x

print(ans/n)
X=int(input())
def momo(s)
if int(s)>X:
  return 0
 
nagi=1 if all(s.count(c)>0 for c in '753') else 0
  for c in '753':
    nagi+=momo(s+c)
    return nagi
print(momo('0'))

### FIXED CODE ###

X=int(input())
def momo(s):
  if int(s)>X:
    return 0
  nagi=1 if all(s.count(c)>0 for c in '753') else 0
  for c in '753':
    nagi+=momo(s+c)
  return nagi
print(momo('0'))
n,a,b=input().split()
try:
    loop=n//(a+b)
except:
    loop=0
try:
    remainder=n%(a+b)
except:
    remainder=0
print(loop*a+min(reminder,a)

### FIXED CODE ###

n,a,b=[int(v) for v in input().split()]
try:
    loop=n//(a+b)
except:
    loop=0
try:
    remainder=n%(a+b)
except:
    remainder=0
print(loop*a+min(remainder,a))
import math

money = int(input())

six = [6**i for i in range(1, 8)]
nine = [9**i for i in range(1, 7)]

all = [1] + sorted(six + nine)

dp = [float(math.inf) for i in range(100001)]
dp[0] = 0

for i in range(0, 100001):
    for el in all:
        temp = i + el
        if temp < 100001:
            dp[temp] = min(dp[temp], dp[i] + 1)

print(dp[money])


### FIXED CODE ###

money = int(input())

six = [6**i for i in range(1, 8)]
nine = [9**i for i in range(1, 7)]

all = [1] + sorted(six + nine)

dp = [100000 for i in range(100001)]
dp[0] = 0

for i in range(0, 100001):
    for el in all:
        temp = i + el
        if temp < 100001:
            dp[temp] = min(dp[temp], dp[i] + 1)

print(dp[money])
N = int(input())
A = list(map(int, input().split())
for a in A:
  if a % 2 == 0 and (a % 3 != and a % 5 != 0):
    print("DENIED")
    exit()
print("APPROVED")

### FIXED CODE ###

n = int(input())
A = list(map(int, input().split()))
for a in A:
    if a%2 == 0 and ( a%3 != 0 and a%5 != 0 ):
        print('DENIED')
        exit()
print('APPROVED')
n=int(input())
s=['']*n
a=[0]*n
for i in range(n):
  s[i],v=input().split()
  a[i]=int(v)
x=input()
flg=False
ans=0
for i in range(n):
  if flg:
    ans+=a[i]
  if s[i]==x
    flg=True
print(ans)

### FIXED CODE ###

n=int(input())
s=['']*n
a=[0]*n
for i in range(n):
  s[i],v=input().split()
  a[i]=int(v)
x=input()
flg=False
ans=0
for i in range(n):
  if flg:
    ans+=a[i]
  if s[i]==x:
    flg=True
print(ans)
N = int(input())
a = list(map(int,input().split()))
BS = 1
for i in range(N):
  if a[i] == i:
    BS += 1
if a[i] == 1:
  print(-1)
else:
  print(N+1-BS)

### FIXED CODE ###

A = int(input())
B = int(input())
print(6-A-B)