Harryxun/stf_run huggingface dataset:
n=map(int,input().split())
for i in range(n):
    if (i%3==0) and (i%5==0):
        print("FizzBuzz")
    elif (i%3==0) and (i%5!=0):
        print("Fizz")
    elif (i%3!=0) and (i%5==0):
        print("Buzz")
    else:
        print(i)
    


### FIXED CODE ###

n=int(input())
num=0
for i in range(1,n+1):
    if (i%3!=0) and (i%5!=0):
        num+=i
print(num)
import re
_, q = input().split()
s = list(input())
qs = [list(map(int, input().split())) for _ in range(int(q))]

def get_num_AC(ccond, s, count):
    if s == []:
        return count
    if ccond:
        if s.pop() == 'A':
            return get_num_AC(False, s, count+1)
        else:
            if s == []:
                return count
            else:
                return get_num_AC(s.pop() == 'C', s, count)
    return get_num_AC(s.pop() == 'C', s, count)

def get_substr(s, smaller, larger):
    s1 = s[smaller-1:larger]
    return s1

for smaller, larger in qs:
    substr = get_substr(s, smaller, larger)
    count = get_num_AC(substr)
    print(count)


### FIXED CODE ###

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

s = input()

count = [0] * n

for i in range(1, n):
    if s[i-1] == 'A' and s[i] == 'C':
        count[i] += 1

from itertools import accumulate

accum = list(accumulate(count))

for _ in range(q):
    l, r = map(int, input().split())
    print(accum[r-1] - accum[l-1])
a,b=map(str,input().split())
if a>=b:
  print(b*a)
elif b>=a:
  print(a*b)


### FIXED CODE ###

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

if a>=b:
  print(b*int(a))
elif b>=a:
  print(a*int(b))
import math
A, B, C, D = (map(int, input().split()))

def lcm(a, b):
	return a * b / math.gcd(a, b)

s = lcm(C, D)	

p  = B - A + 1 - int((B // C - (A - 1) // C) + (B // D - (A - 1) // D) - (B // s - (A - 1) // s))
print(p)

### FIXED CODE ###

from fractions import gcd
A, B, C, D = (map(int, input().split()))


s = int(C * D // gcd(C, D))

p  = B - A + 1 - int((B // C - (A - 1) // C) + (B // D - (A - 1) // D) - (B // s - (A - 1) // s))
print(p)
a=input()
if a[1]=="+":
  print(int(a[0])+int(a[2]))
else:
  print(int(a[0])-int(a[2]))


### FIXED CODE ###

a=input().split()
if a[1]=="+":
  print(int(a[0])+int(a[2]))
else:
  print(int(a[0])-int(a[2]))
def insertion(A, n, g):
    global cnt
    for i in range(g, n):
        while i >= g and A[i - g] > A[i]:
            A[i], A[i - g] = A[i - g], A[i]
            i -= g
            cnt += 1

def main():
    global cnt
    cnt = 0
    n = int(raw_input())
    A = [int(raw_input()) for i in range(n)]

    G = list()
    h = 1
    while h <= n:
        G.append(h)
        h = 3 * h + 1
    G = G[::-1]

    for i in G:
        insertion(A, n, i)

    print(len(G))
    print(" ".join(map(str, G)))
    print(cnt)
    for j in A: print(j)

main()

### FIXED CODE ###

def insertion(A, n, g):
    cnt = 0
    for i in range(g, n):
        while i >= g and A[i - g] > A[i]:
            A[i], A[i - g] = A[i - g], A[i]
            i -= g
            cnt += 1
    return cnt

def main():
    n = int(raw_input())
    A = [int(raw_input()) for i in range(n)]

    G = list()
    h = k = 1
    while h <= n:
        G.append(h)
        h = (4 ** k) + (3 * (2 ** (k - 1)) + 1)
        k += 1
    G = G[::-1]

    cnt = 0
    for i in G:
        cnt += insertion(A, n, i)

    print(len(G))
    print(" ".join(map(str, G)))
    print(cnt)
    for j in A: print(j)

main()
x = input()
int(x)
print(x**3)



### FIXED CODE ###

print(int(input())**3)
n, a, b = int(input())
if a*n > b:
  print(a*n)
else:
  print(b)

### FIXED CODE ###

n, a, b = map(int, input().split())
if a*n < b:
  print(a*n)
else:
  print(b)
x = input()
x[0],x[1],x[2],x[3] = "2","0","1","8"
print(x)

### FIXED CODE ###

x = input()
print("2018"+x[4:])
N = int(input())

ans = N * (N-1) / 2

print(int(ans))

### FIXED CODE ###

S = input()
T = input()

ans = 0
for i in range(3):
    if S[i] == T[i]:
        ans += 1
print(ans)
from collections import Counter
def main():
    H,W = map(int,input().split())
    s = [list(map(str,input())) for _ in range(H)]
    INF = 10**5
    maze_list = [[INF for _ in range(W)] for _ in range(H)]
    maze_list[0][0] = 0
    def item(array):
        return [item for sublist in array for item in sublist]

    counter = sorted(list(Counter(item(s)).items()))

    queue = []
    queue.insert(0,(0,0))
    while len(queue):
        x,y = queue.pop()
        if x == H-1 and y == W-1:
            break
        for i in range(4):
            nx,ny = x + [1,0,-1,0][i],y + [0,1,0,-1][i]
            if (0<=nx and nx<H and 0<=ny and ny<W):
                if (s[nx][ny]!="#" and maze_list[nx][ny]==INF):
                    queue.insert(0,(nx,ny))
                    maze_list[nx][ny] = maze_list[x][y] + 1

    if maze_list[H-1][W-1] == INF:
        print(-1)
    else:
        print(counter[1][1]-maze_list[H-1][W-1]-1)

if __name__ == "__main__":
    main()

### FIXED CODE ###

from collections import Counter
def main():
    H,W = map(int,input().split())
    s = [list(map(str,input())) for _ in range(H)]
    INF = 10**5
    maze_list = [[INF for _ in range(W)] for _ in range(H)]
    maze_list[0][0] = 0
    def item(array):
        return [item for sublist in array for item in sublist]

    counter = list(Counter(item(s)).items())
    num = 0
    for i in range(len(counter)):
        if counter[i][0] == ".":
            num = counter[i][1]
            break

    queue = []
    queue.insert(0,(0,0))
    while len(queue):
        x,y = queue.pop()
        if x == H-1 and y == W-1:
            break
        for i in range(4):
            nx,ny = x + [1,0,-1,0][i],y + [0,1,0,-1][i]
            if (0<=nx and nx<H and 0<=ny and ny<W and \
                s[nx][ny]!="#" and maze_list[nx][ny]==INF):
                queue.insert(0,(nx,ny))
                maze_list[nx][ny] = maze_list[x][y] + 1

    if maze_list[H-1][W-1] == INF:
        print(-1)
    else:
        print(num-maze_list[H-1][W-1]-1)

if __name__ == "__main__":
    main()
import numpy as np

h, w = map(int, input().split())

grid = [[False] * (w + 2)]
for _ in range(w):
    grid.append([False] + [x == '#' for x in input()] + [False])
grid.append([False] * (w + 2))

grid = np.array(grid)

cnt = 0
while True:
    for i in range(1, h + 1):
        for j in range(1, w + 1):
            print('#' if grid[i, j] else '.', end='')
        print()
    if np.all(grid[1:-1, 1:-1]):
        break

    new_grid = grid.copy()
    for i in range(1, h + 1):
        for j in range(1, w + 1):
            if grid[i][j] == 0:
                if grid[i + 1, j] or grid[i, j + 1] or grid[i - 1, j] or grid[i, j - 1]:
                    new_grid[i][j] = 1
    grid = new_grid
    cnt += 1

print(cnt)


### FIXED CODE ###

h, w = map(int, input().split())

grid = [[True] * (w + 2)]
for _ in range(h):
    grid.append([True] + [x == '#' for x in input()] + [True])
grid.append([True] * (w + 2))

q = []

for i in range(1, h + 1):
    for j in range(1, w + 1):
        if grid[i][j] is True:
            q.append((i, j))

cnt = 0
while q:
    qq = []
    for i, j in q:
        if not grid[i + 1][j]:
            grid[i + 1][j] = True
            qq.append((i + 1, j))
        if not grid[i - 1][j]:
            grid[i - 1][j] = True
            qq.append((i - 1, j))
        if not grid[i][j + 1]:
            grid[i][j + 1] = True
            qq.append((i, j + 1))
        if not grid[i][j - 1]:
            grid[i][j - 1] = True
            qq.append((i, j - 1))

    cnt += 1
    q = qq

print(cnt - 1)
N, K = map(int, input().split())
V = list(map(int, input().split()))

def calc(l, r, d):
    hold = []
    for i in range(l):
        hold.append(V[i])
    for i in range(N-1, N-1-r, -1):
        hold.append(V[i])
    hold.sort()
    return sum(hold[d:])

ret = 0
for l in range(K+1):
    for r in range(K+1-l):
        d = K - l - r
        if d > l + r:
            continue
        ret = max(ret, calc(l, r, d))
print(ret)

### FIXED CODE ###

N, K = map(int, input().split())
V = list(map(int, input().split()))
U = V[::-1]
ret = 0

m = min(N, K)
for l in range(m+1):
    for r in range(m+1-l):
        hold = V[:l] + U[:r]
        hold.sort()
        for d in range(K+1-l-r):
            ret = max(ret, sum(hold[d:]))

print(ret)
l, r = [int(x) for x in input().split()]

l_mod = l % 2019
r_mod = l_mod + (r - l + 1) % 2019 - 1

for i in range(l_mod, r_mod):
    for j in range(i + 1, r_mod + 1):
        tmp = (i * j) % 2019
        if (i = l_mod and j = i + 1) or tmp < ans:
            ans = tmp

print(ans)

### FIXED CODE ###

l, r = [int(x) for x in input().split()]

l_mod = l % 2019
if r - l >= 2019:
    r_mod = l_mod + (r - l - 2019) % 2019 + 2019
else:
    r_mod = l_mod + (r - l) % 2019

ans = 2019
for i in range(l_mod, r_mod):
    for j in range(i + 1, r_mod + 1):
        tmp = (i * j) % 2019
        if tmp < ans:
            ans = tmp

print(ans)
n = raw_input()
A = map(int, raw_input().split())
q = raw_input()
m = map(int, raw_input().split())

def solve(i, m):
 if m == 0:
  return true
 if i >= n and m > 0:
  return false
 res = solve(i + 1, m) or solve(i + 1, m - A(i))
 return res

for j in range(0, q):
 if m == solve(0, m(j)):
  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 j in range(0, q):
 if solve(0, m[j]):
  print 'yes'
 else:
  print 'no'
def writeanderase(n , a):

    ans = {}

    for i in range(n):
        if a[i] in ans:
            ans[a[i]] += 1
        else:
            ans[a[i]] = 1

    for i in ans.values():
        count += i % 2

    return count

def main():
    n = int(input())
    a = [int(input()) for i in range(n)]
    print(writeanderase(n , a))

if __name__ == '__main__':
    main()

### FIXED CODE ###

def writeanderase(n , a):

    ans = {}
    count = 0

    for i in range(n):
        if a[i] in ans:
            ans[a[i]] += 1
        else:
            ans[a[i]] = 1

    for i in ans.values():
        count += i % 2

    return count

def main():
    n = int(input())
    a = [int(input()) for i in range(n)]
    print(writeanderase(n , a))

if __name__ == '__main__':
    main()
import sys
sys.setrecursionlimit(10000)

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

# 無限大の値
f_inf = float('inf')

# メモ用のDP テーブルを初期化　(最小化問題なので INF に初期化)
dp = [f_inf] * (10**5+10)

# dpの最小値を変更する関数
def chmin(a, b):
    if a > b:
        return b
    else:
        return a

# メモ化再帰の関数
def rec(i):
    # DPの値が更新されている場合はその値を返す
    if dp[i] <  f_inf:
        return dp[i]
    
    # 再帰の終了条件。足場0のコストは0
    if i == 0:
        return 0
    
    # i-1, i-2　を再帰
    res = f_inf
    # i-1 から来た場合
    res = chmin(res, rec(i-1) + abs(h[i] - h[i-1]))
    # i-2 から来た場合
    if i > 1:
        res = chmin(res, rec(i-2) + abs(h[i] - h[i-2]))
    
    # 結果をメモする
    dp[i] = res
    return res

ans = rec(n-1)
print(ans)

### FIXED CODE ###

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

# dpの最小値を変更する関数
def chmin(a, b):
    if a > b:
        return b
    else:
        return a
    
# 無限大の値
f_inf = float('inf')

# DP テーブルを初期化　(最小化問題なので INF に初期化)
dp = [f_inf] * (10**5+10)

# 初期条件
dp[0] = 0

# 足場 i-1 から足場 i へ移動する。コストは|h[i]−h[i-1]|
# 足場 i-2 から足場 i へと移動する コストは |h[i]−h[i-2]|
for i in range(1, n):
    dp[i] = chmin(dp[i], dp[i - 1] + abs(h[i] - h[i-1]))
    # 一番目の足場では一つ前しか存在しない
    if i > 1:
        dp[i] = chmin(dp[i], dp[i - 2] + abs(h[i] - h[i -2]))

print(dp[n-1])
n,m = map(int,input().split())
s = []
for i in range(m):
  ks = list(map(int,input().split()))
  s.append(ks)
p = list(map(int,input().split()))
ans = 0
for i in range(2**n):
  flag = True
  for j in range(m):
    count = 0
    for k in range(s[m][0]):
      if i & (1<<(s[m][k+1]-1)): count += 1
    if count%2!=p[j]: flag = False
  if flag==True: ans += 1
print(ans)


### FIXED CODE ###

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

ans = 0
for i in range(1<<n):
  flag = True
  for j in range(m):
    l = light[j][1:]
    count = 0
    for s in l:
      if i & (1<<(s-1)):
        count += 1
    if count%2 != p[j]:
      flag = False
  if flag==True:
    ans += 1
print(ans)
input()
num_list = [int(x) for x in input().split()]

print(num_list.max - num_list.min )

### FIXED CODE ###

input()
num_list = [int(x) for x in input().split()]

print(max(num_list)- min(num_list))
N, M = map(int, input().split())
xrd = [[] for i in range(N)]
x = [None]*N
visited = []


def check(s):
    global xrd, x, visited
    visited.append(s)
    for t, d in xrd[s]:
        if t in visited:
            continue
        if x[t] is None:
            x[t] = x[s] + d
            check(t)
        else:
            if x[t] != x[s] + d:
                print("No")
                exit()


for i in range(M):
    L, R, D = map(int, input().split())
    xrd[L-1].append([R-1, D])
    xrd[R-1].append([L-1, -D])

for i in range(N):
    if x[i] is None:
        x[i] = 0
        check(i)


print("Yes")


### FIXED CODE ###

import sys
sys.setrecursionlimit(200002)

N, M = map(int, input().split())
G = [[] for _ in range(N)]
x = [None] * N

def fail():
    print("No")
    exit()

def dfs(s):
    global x, G
    for t, d in G[s]:
        if x[t] is None:
            x[t] = x[s] + d
            dfs(t)
        else:
            if x[t] != x[s] + d:
                fail()

for _ in range(M):
    L, R, D = map(int, input().split())
    G[L-1].append([R-1,  D])
    G[R-1].append([L-1, -D])

for i in range(N):
    if x[i] is None:
        x[i] = 0
        dfs(i)

print("Yes")
N, Q = map(int,input().split())

AB = [[int(x) for x in input().split()] for _ in range(N-1)]

# print(AB)

# 添字を1からにしたいのでN+1
graph = [[] for _ in range(N+1)]

# 各頂点に隣接する頂点
for a,b in AB:
    graph[a].append(b)
    graph[b].append(a)

# print(graph)
counter = [0] * (N+1)

# print(counter)

PX = [[int(x) for x in input().split()] for _ in range(Q)]

# 各頂点に点数を足す
for p,x in PX:
  counter[p] += x


def shori(pa,c,val):
  val += counter[c]
  counter[c] = val
  for i in graph[c]:
    if i == pa:
      continue
    shori(c,i,val)
  
shori(0,1,0)
  

print(" ".join(map(str, counter[1:])))



### FIXED CODE ###

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

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

# AB = [[int(x) for x in input().split()] for _ in range(N-1)]

# print(AB)

# 添字を1からにしたいのでN+1
graph = [[] for _ in range(N+1)]

# 各頂点に隣接する頂点
for _ in range(N-1):
    a, b = map(int, input().split())
    graph[a].append(b)
    graph[b].append(a)

# print(graph)
counter = [0] * (N+1)

# print(counter)

# PX = [[int(x) for x in input().split()] for _ in range(Q)]

# 各頂点に点数を足す
for _ in range(Q):
  p, x = map(int, input().split())
  counter[p] += x


def shori(pa,c,val):
  val += counter[c]
  counter[c] = val
  for i in graph[c]:
    if i == pa:
      continue
    shori(c,i,val)
  
shori(0,1,0)
  

print(" ".join(map(str, counter[1:])))
from heapq import heappush, heappop
N, M = map(int, inputs[0].split())
A = list(map(int, inputs[1].split()))

queue = []
for a in A:
    heappush(queue, -a)

for _ in range(M):
    heappush(queue, -(-heappop(queue) // 2))
print(-sum(queue))

### FIXED CODE ###

import sys
inputs = sys.stdin.readlines()

from heapq import heappush, heappop
N, M = map(int, inputs[0].split())
A = list(map(int, inputs[1].split()))

queue = []
for a in A:
    heappush(queue, -a)

for _ in range(M):
    heappush(queue, -(-heappop(queue) // 2))
print(-sum(queue))
import fractions

abcd = list(map(int, input().split()))
a = abcd[0]
b = abcd[1]
c = abcd[2]
d = abcd[3]

aa = a - 1
lcm = (c * d) // fractinos.gcd(c, d)

a_count = aa - (aa // c) - (aa // d) + (aa // lcm)
b_count = b - (b // c) - (b // d) + (b // lcm)

print(b_count - a_count)

### FIXED CODE ###

import fractions

abcd = list(map(int, input().split()))
a = abcd[0]
b = abcd[1]
c = abcd[2]
d = abcd[3]

aa = a - 1
lcm = (c * d) // fractions.gcd(c, d)

a_count = aa - (aa // c) - (aa // d) + (aa // lcm)
b_count = b - (b // c) - (b // d) + (b // lcm)

print(b_count - a_count)
[a,b]=[int(i) for i in input().split()]
if a*b=15:
    print("*")
elif a+b=15:
    print("+")
else:
    print("x")


### FIXED CODE ###

[a,b]=[int(i) for i in input().split()]
if a*b==15:
    print("*")
elif a+b==15:
    print("+")
else:
    print("x")
# -*- coding: utf-8 -*-
N = int(input())
a = []
for i in range(1,N+1):
  a.append(input())
if a.count("Y") == 0:
  print("Three")
else:
  print("Four")

### FIXED CODE ###

N = int(input())
S = list(map(str,input().split()))
if S.count("Y") == 0:
  print("Three")
else:
  print("Four")
S = input().split("/")
if S[1] >= 5:
  print("TBD")
else:
  print("Heisei")

### FIXED CODE ###

S = list(map(int, input().split("/")))
if S[1] >= 5:
  print("TBD")
else:
  print("Heisei")
age = int(print())
if age==7 || age==5 || age==3:
  print('YES')
else:
  print('NO')



### FIXED CODE ###

age = int(input())
if age == 7 or age == 5 or age == 3:
    print('YES')
else:
    print('NO')
while True:
    m, f, r = map(int, input().split())
    if m == -1 and f == -1 and r == -1:
        break
    elif (m == -1 or f == -1) or m+f < 30:
        print(F)
    elif m + f >= 80:
        print(A)
    elif 65 <= m + f < 80:
        print(B)
    elif 50 <= m + f < 65:
        print(C)
    elif 30 <= m + F < 50:
        if r >= 50:
            print(C)
        else:
            print(D)
    else:
        print(F)


### FIXED CODE ###

while True:
    m, f, r = map(int, input().split())
    if m == -1 and f == -1 and r == -1:
        break
    elif (m == -1 or f == -1) or m+f < 30:
        print('F')
    elif m + f >= 80:
        print('A')
    elif 65 <= m + f < 80:
        print('B')
    elif 50 <= m + f < 65:
        print('C')
    elif 30 <= m + f < 50:
        if r >= 50:
            print('C')
        else:
            print('D')
    else:
        print('F')
# 正解ではない

from queue import PriorityQueue


def main():
    H, W = map(int, input().split())
    Ch, Cw = map(int, input().split())
    Dh, Dw = map(int, input().split())
    S = [list(input()) for i in range(H)]
    q = PriorityQueue()
    q.put((0, (Ch - 1, Cw - 1)))

    answer = resolve(q, S, (Dh - 1, Dw - 1), H, W)
    print(answer)


def resolve(q, S, D, H, W):
    is_empty = True
    location_list = set()
    while not q.empty():
        worp_count, (x, y) = q.get()
        S[x][y] = '/'
        is_empty = False

        if (x, y) == D:
            return worp_count

        location_list.add((x, y))
        if 0 <= x - 1 < H and S[x - 1][y] == '.':
            q.put((worp_count, (x - 1, y)))
        elif 0 <= x + 1 < H and S[x + 1][y] == '.':
            q.put((worp_count, (x + 1, y)))
        elif 0 <= y - 1 < W and S[x][y - 1] == '.':
            q.put((worp_count, (x, y - 1)))
        elif 0 <= y + 1 < W and S[x][y + 1] == '.':
            q.put((worp_count, (x, y + 1)))

    if is_empty:
        return -1

    for i in range(-2, 3):
        for j in range(-2, 3):
            for x, y in location_list:
                if 0 <= x + i < H and 0 <= y + j < W and S[x + i][y + j] == '.':
                    q.put((worp_count + 1, (x + i, y + j)))

    return resolve(q, S, D, H, W)


if __name__ == "__main__":
    main()


### FIXED CODE ###

from collections import deque


def main():
    H, W = map(int, input().split())
    Ch, Cw = map(int, input().split())
    Dh, Dw = map(int, input().split())
    S = [list(input()) for _ in range(H)]
    d = [[-1 for _ in range(W)] for _ in range(H)]

    q = deque([])
    q.appendleft((0, Ch - 1, Cw - 1))

    while len(q):
        worp_count, x, y = q.popleft()

        if d[x][y] != -1:
            continue
        d[x][y] = worp_count

        for i, j in ((a, b) for a in range(-2, 3) for b in range(-2, 3)):
            nx = x + i
            ny = y + j
            if 0 <= nx < H and 0 <= ny < W and S[nx][ny] == '.':
                if i == 0 and j == 0:
                    continue
                elif abs(i) + abs(j) == 1:
                    q.appendleft((worp_count, nx, ny))
                else:
                    q.append((worp_count + 1, nx, ny))

    print(d[Dh - 1][Dw - 1])


if __name__ == "__main__":
    main()
n, m = [int(x) for x in input().split()]
x = [int(x) for x in input().split()]

x.sort()
dist = [0] * (m-1)
for i in range(m-1):
    dist[i] = x[i+1] - x[i]
dist.sort(reverse=True)

length = x[m-1]-x[0]
for i in range(n-1):
    length -= dist[i]

print(length)


### FIXED CODE ###

n, m = [int(x) for x in input().split()]
x = [int(x) for x in input().split()]

x.sort()

dist = [0] * (m-1)
for i in range(m-1):
    dist[i] = x[i+1] - x[i]
dist.sort(reverse=True)

if m <= n:
    print(0)
else:
    length = x[m-1]-x[0]
    for i in range(n-1):
        length -= dist[i]
    print(length)
def minchange(s,t):
  m=len(s)
  n=len(t)
  if n!=m:
    return -1
  cnt=[0]*256
  for i in range(n):
    cnt[ord(t[i])]+=1
  for i in range(n):
    cnt[ord(s[i])]-=1
  for i in range(256):
    if cnt[i]:
      return -1
  res=0
  i=n-1
  j=n-1
  while i>=0:
    while i>=0 and s[i]!=t[i]:
      i-=1
      res+=1
    if i>=0:
      i-=1
      j-=1
  return res
s=input()
t=input()
print(str(minchange(s,t))
      
  


### FIXED CODE ###

def minchange(s,t):
  m=len(s)
  n=len(t)
  if n!=m:
    return -1
  cnt=[0]*256
  for i in range(n):
    cnt[ord(t[i])]+=1
  for i in range(n):
    cnt[ord(s[i])]-=1
  res=0
  i=n-1
  j=n-1
  while i>=0:
    while i>=0 and s[i]!=t[i]:
      i-=1
      res+=1
    if i>=0:
      i-=1
      j-=1
  return res
s=input()
t=input()
print(str(minchange(s,t)))
N = int(input())
A = list(map(int, input().split()))
# print(A)
if A.count(0) > 1:
    print(0)
    exit()

A = sorted(A)[::-1]
memo = [0 for i in range(N)]
memo[0] = N-1
memo[1] = N-1
if N % 2 == 0:
    for i in range(2, N):
        memo[i] = memo[i-2]-2
        if memo[i] != A[i]:
            print(0)
            exit()
else:
    for i in range(2, N-1):
        memo[i] = memo[i-2]-2
        if memo[i] != A[i]:
            print(0)
            exit()



print(((N // 2)**2)%(10**9+7))

### FIXED CODE ###

N = int(input())
if N == 1:
    print(1)
    exit()
A = list(map(int, input().split()))
A = sorted(A)[::-1]
memo = [0 for i in range(N)]
memo[0] = N-1
memo[1] = N-1
if N % 2 == 0:
    for i in range(2, N):
        memo[i] = memo[i-2]-2
        if memo[i] != A[i]:
            print(0)
            exit()
else:
    for i in range(2, N-1):
        memo[i] = memo[i-2]-2
        if memo[i] != A[i]:
            print(0)
            exit()


# 最初(N//2)**2にしていた、それぞれの場合の数ではなくなってしまう
print((2**(N // 2))%(10**9+7))
N, A, B= map(int, input().split())
print(min(N, A, B)
if A==B:
	print(A)
elif A>B:
	  print(A-B)
elif:
	  printt(B-A)
else:
      pass

### FIXED CODE ###

N, A, B= map(int, input().split())
print(min(A, B), max(0, A + B - N))
n = int(input())

counted = n.count(7)

if counted == True:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

n = input()
if "7" in n:
  print("Yes")
else:
  print("No")
N,D = map(int,input().split())
Answer = (N-1)//(2D+1)+1
print(Answer)

### FIXED CODE ###

n, d = map(int, input().split())
Answer = n//(2*d+1)
if n%(2*d+1) != 0:
  Answer +=1
  
print(Answer)