Harryxun/stf_run huggingface dataset:
print(sum([x for x in range(a,int(input())+1) if (x%3!=0)and(x%5!=0)]))

### FIXED CODE ###

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

r_cnt=s.count("R")
g_cnt=s.count("G")
b_cnt=s.count("B")

ans=r_cnt*g_cnt*b_cnt

for i in range(n):
    for d in range(n):
        j=i+d
        k=j+d
        if k>=n:break
        if s[i]!=s[j] and s[j]!=s[k] and s[k]!=s[i]:
            ans -= 1

print(ans)
while(True):
    a = int(input())
    b = a // 1000
    c = (a - 1000 * b) // 100
    d = a % 100 // 10

    if (d == b == c):
        print('Yes')
    else:
        print('No')


### FIXED CODE ###

a = int(input())
b = a // 1000
c = (a - 1000 * b) // 100
d = a % 100 // 10
e=a%10
if ( b == c and c==d ):
        print('Yes')
elif(c==d and d==e):
        print('Yes')
else:
        print('No')
import sys
input = sys.stdin.readline

a, b, c, d = input()
ans = 0
a = int(a);b = int(b);c = int(c);d = int(d)
if a+b+c+d == 7:
    a = str(a);b = str(b);c = str(c);d = str(d)
    ans = a+'+'+b+'+'+c+'+'+d+'=7'
elif a+b+c-d == 7:
    a = str(a);b = str(b);c = str(c);d = str(d)
    ans = a+'+'+b+'+'+c+'-'+d+'=7'
elif a+b-c-d == 7:
     a = str(a);b = str(b);c = str(c);d = str(d)
     ans = a+'+'+b+'-'+c+'-'+d+'=7'
elif a+b-c+d == 7:
    a = str(a);b = str(b);c = str(c);d = str(d)
    ans = a+'+'+b+'-'+c+'+'+d+'=7'
elif a-b+c+d == 7:
    a = str(a);b = str(b);c = str(c);d = str(d)
    ans = a+'-'+b+'+'+c+'+'+d+'=7'
elif a-b+c-d == 7:
    a = str(a);b = str(b);c = str(c);d = str(d)
    ans = a+'-'+b+'+'+c+'-'+d+'=7'
elif a-b-c+d == 7:
    a = str(a);b = str(b);c = str(c);d = str(d)
    ans = a+'-'+b+'-'+c+'+'+d+'=7'
else:
    a = str(a);b = str(b);c = str(c);d = str(d)
    ans = a+'-'+b+'-'+c+'-'+d+'=7'
print(ans)

### FIXED CODE ###

import math
import sys
input = sys.stdin.readline

abcd = int(input())
for i in range(int(4-math.log10(abcd))):
    abcd = '0'+str(abcd)
a, b, c, d = str(abcd)
a = int(a);b = int(b);c = int(c);d = int(d)
if a+b+c+d == 7:
    a = str(a);b = str(b);c = str(c);d = str(d)
    ans = a+'+'+b+'+'+c+'+'+d+'=7'
elif a+b+c-d == 7:
    a = str(a);b = str(b);c = str(c);d = str(d)
    ans = a+'+'+b+'+'+c+'-'+d+'=7'
elif a+b-c-d == 7:
    a = str(a);b = str(b);c = str(c);d = str(d)
    ans = a+'+'+b+'-'+c+'-'+d+'=7'
elif a+b-c+d == 7:
    a = str(a);b = str(b);c = str(c);d = str(d)
    ans = a+'+'+b+'-'+c+'+'+d+'=7'
elif a-b+c+d == 7:
    a = str(a);b = str(b);c = str(c);d = str(d)
    ans = a+'-'+b+'+'+c+'+'+d+'=7'
elif a-b+c-d == 7:
    a = str(a);b = str(b);c = str(c);d = str(d)
    ans = a+'-'+b+'+'+c+'-'+d+'=7'
elif a-b-c+d == 7:
    a = str(a);b = str(b);c = str(c);d = str(d)
    ans = a+'-'+b+'-'+c+'+'+d+'=7'
else:
    a = str(a);b = str(b);c = str(c);d = str(d)
    ans = a+'-'+b+'-'+c+'-'+d+'=7'
print(ans)
import math
from functools import reduce

def gcd_list(lst):
    return reduce(math.gcd, lst)

N = int(input())
lst_monsters = map(int, input().split())
print(gcd_list(lst_monsters))


### FIXED CODE ###

# import math
import fractions
from functools import reduce

def gcd_list(lst):
    # return reduce(math.gcd, lst)
    return reduce(fractions.gcd, lst)

N = int(input())
lst_monsters = map(int, input().split())
print(gcd_list(lst_monsters))
a,b=map(int(input().split()))
s=[2,3,4,5,6,7,8,9,10,11,12,13,1]
if s.index(a)==s.index(b):
    print('Draw')
elif s.index(a)>s.index(b):
    print('Alice')
else:
    print('Bob')

### FIXED CODE ###

a,b=map(int,input().split())
s=[2,3,4,5,6,7,8,9,10,11,12,13,1]
if s.index(a)==s.index(b):
    print('Draw')
elif s.index(a)>s.index(b):
    print('Alice')
else:
    print('Bob')
import math
chou, tan, ji, hun = map(int,input().split())

kakudo = abs(((ji*30 + hun*.5) - (hun*6)))

if kakudo > 180:
    kakudo = 360 - kakudo

kakudo = abs(math.cos(math.radians(kakudo)))
ans =( chou**2 + tan**2 - 2*chou*tan*kakudo)**.5
print(ans)

### FIXED CODE ###

n = int(input())%10
if n in {2, 4, 5, 7, 9}:
    print("hon") 
elif(n == 3):
    print("bon") 
else:
    print("pon")
n,y=map(int,input().split())
for a in range(n+1):
  for b in range(9):
    c=n-a-b
    if c>=0 and a*10000+b*5000+c*1000=y:
      print(a,b,c)
      exit()
print(-1,-1,-1)

### FIXED CODE ###

n,y=map(int,input().split())
for a in range(n+1):
  for b in range(9):
    c=n-a-b
    if c>=0 and a*10000+b*5000+c*1000==y:
      print(a,b,c)
      exit()
print(-1,-1,-1)
import collections

n=int(input())
ans=[0]*(n+1)
arr=[list(map(int,input().split())) for _ in range(n-1)]
arr=sorted(arr,key=lambda x:x[0])
s=set()
tmp=arr[0]
u,v,w=tmp[0],tmp[1],tmp[2]
s.add(u)
s.add(v)
if w%2==0:
  ans[u]=1
  ans[v]=1
elif w%2==1:
  ans[u]=1
  ans[v]=0
q=collections.deque()
cnt=1
cnt2=1
while 1:
  if cnt==n-1:
    break
  else:
    if cnt2<n:
      tmp=arr[cnt2]
      u,v,w=tmp[0],tmp[1],tmp[2]
    else:
      tmp=q.popleft()
      u,v,w=tmp[0],tmp[1],tmp[2]
    cnt2+=1
    if u in s:
      s.add(v)
      cnt+=1
      if w%2==0:
        ans[v]=ans[u]
      else:
        ans[v]=abs(ans[u]-1)
    elif v in s:
      s.add(u)
      cnt+=1
      if w%2==0:
        ans[u]=ans[v]
      else:
        ans[u]=abs(ans[v]-1)
    else:
      q.append([u,v,w])
for i in range(1,n+1):
  print(ans[i])

### FIXED CODE ###

import collections

n=int(input())
ans=[0]*(n+1)
tree=[[] for _ in range(n+1)]
for i in range(n-1):
  u,v,w=map(int,input().split())
  tree[u].append([v,w])
  tree[v].append([u,w])
q=collections.deque([1])
check=[False]*(n+1)
check[1]=True
tmp=tree[1][0]
if tmp[1]%2==0:
  ans[1]=1
  ans[tmp[0]]=1
else:
  ans[1]=1
  ans[tmp[0]]=0
while 1:
  if len(q)==0:
    break
  tmp=q.popleft()
  for i in range(len(tree[tmp])):
    v,w=tree[tmp][i][0],tree[tmp][i][1]
    if check[v]:
      continue
    else:
      check[v]=True
      if w%2==0:
        ans[v]=ans[tmp]
      else:
        ans[v]=abs(1-ans[tmp])
      q.append(v)
for i in range(1,n+1):
  print(ans[i])
# coding: utf-8


def solve(*args: str) -> str:
    n = int(args[0])
    A = tuple(map(int, args[1].split()))

    ret = 0

    xor = [0]*(2**n)
    xor[1] = A[0]

    for i in range(1, n):
        for j in range(2**i):
            xor[2**i+j] = A[i] ^ xor[j]

    for i in range(1, 2**(n-1)):
        ret = max(ret, xor[i] + xor[-1-i])

    return str(ret)


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))


### FIXED CODE ###

# coding: utf-8
import numpy as np


def solve(*args: str) -> str:
    n = int(args[0])
    A = np.array(args[1].split(), dtype=np.int64)

    n_bit = len(np.binary_repr(max(A)))

    xor = np.bitwise_xor.reduce(A)
    A &= ~xor

    for b in reversed(range(n_bit)):
        b_set = A & 1 << b != 0
        msb_args = np.where(b_set & (A < 1 << b+1))[0]
        if len(msb_args):
            b_set[msb_args[0]] = False
            A[b_set] ^= A[msb_args[0]]

    ret = 2*np.bitwise_xor.reduce(A) + xor

    return str(ret)


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))
s = int(input())
#最後に切った場所がiであるようなパターンの数をdp[i]とする
dp=[0]*(s+1)
dp[0]=1
if s<3:
  print("0")
elif 3<=s<6 :
  print("1")
  
for i in range(3,s+1):
  dp[i]=dp[i-1]+dp[i-3]
  dp.append(dp[i])
  score=dp[s]%(10**9+7)
print(score)

### FIXED CODE ###

s = int(input())
#最後に切った場所がiであるようなパターンの数をdp[i]とする
dp=[0]*(s+1)
dp[0]=1
if s<3:
  print("0")  
else:
  for i in range(3,s+1):
    dp[i]=dp[i-1]+dp[i-3]
    dp.append(dp[i])
    score=dp[s]%(10**9+7)
  print(score)
from math import factorial

def count_pattern(n, r):
    if r == 0:
        return 1
    else:
        a = factorial(n) // factorial(r) // factorial(n - r)
    return int(a)

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

for i in range(k):
    pick_count = i + 1

    blue_pattern =  count_pattern(k - 1, pick_count - 1)
    red_pattern = count_pattern(n - k + 1 , pick_count)
    total_pattern = blue_pattern * red_pattern
    print (int(total_pattern % (10 ** 9 + 7)))


### FIXED CODE ###

import collections

inputstr = input()
input = sorted(inputstr)
a = collections.Counter(input)
if len(a) == 2 and a.most_common()[0][1] == 2:
    print('Yes')
else:
    print('No')
weather=["Sunny","Cloudy","Rainy"]
print(chr(1+(weather.index(input))))

### FIXED CODE ###

weather=["Rainy","Cloudy","Sunny"]
print(weather[-1+weather.index(input())])
l = list(input().split())
print(l[0][0]+l[1][1]+l[2][2])

### FIXED CODE ###

a = input()
b = input()
c = input()
print(a[0]+b[1]+c[2])
N = int(input())
A = [0] * N
B = [0] * N
AB = [0] * N
BA = [0] * N
need = {}
for i in range(N):
    A[i], B[i] = [int(x) for x in input().split()]
    need[B[i]] = A[i]
    BA[i] = [B[i], A[i]]
list.sort(BA)
t = 0
fail = 0
for n in range(N):å
    t += BA[n][1]
    if t > BA[n][0]:
        fail = 1
        break
if fail:
    print('No')
else:
    print('Yes')

### FIXED CODE ###

N = int(input())
A = [0] * N
B = [0] * N
AB = [0] * N
BA = [0] * N
for i in range(N):
    A[i], B[i] = [int(x) for x in input().split()]
    BA[i] = [B[i], A[i]]
list.sort(BA)
t = 0
fail = 0
for n in range(N):
    t += BA[n][1]
    if t > BA[n][0]:
        fail = 1
        break
if fail:
    print('No')
else:
    print('Yes')
n, k = map(int, input().split())
a = list(map(int, input().split()))

zyun = [a[0]]
alr = [False]*n
alr[0] = True
crr = a[0]

if k == 1:
    print(a[0])
    exit()
key = True

while key:
    if not alr[crr - 1]:
        alr[crr - 1] = True
        crr = a[crr - 1]
        zyun.append(crr)
        continue
    else:
        key = False

for i in range(n):
    if a[i] == crr:
        index = crr
        break


if index - 1 == 0:
    zyun1 = zyun
    zyun2 = zyun
else:
    zyun1 = zyun[:index]
    zyun2 = zyun[index:]

# print(zyun1, zyun2)

if len(zyun1) >= k:
    ind = len(zyun1) % k
    if ind == 0:
        print(zyun1[-1])
    else:
        print(zyun1[ind - 1])
else:
    ind = (k - len(zyun1)) % len(zyun2)
    if ind == 0:
        print(zyun2[-1])
    else:
        print(zyun2[ind - 1])

### FIXED CODE ###

n, k = map(int, input().split())
a = [int(n) - 1 for n in input().split()]  # indexに合うように調整する
v = [-1] * n  # 到達してるかどうかを格納するリスト

D = [0]  # Dは循環するもののindexを格納する
v[0] = 0  # 初期スタート位置の到達ステータスは0

cur = a[0]  # 初期位置はindex=0
i = 1

while v[cur] == -1:
    D.append(cur)
    v[cur] = i # 到達済みに変更(iは何番目に到達したか）
    if k == i:  # 循環が発生する前にkの上限に達してしまった場合
        print(cur + 1)
        exit()

    i += 1
    cur = a[cur]

# 循環している場合を考える
k -= v[cur]  # 1回目の到達点を引く
k %= (i - v[cur])  # kを循環する回数で割った余りを考える = 循環した中でどれかという事が分かる

print(D[v[cur] + k] + 1)  # v[cur]で循環しない部分を表し、kで循環した中でどこかを表す
def sumTree(index, children, prev, pointTree=[]):
    sumPoint = point[index] + prev
    pointTree.append(sumPoint)

    for key in children:
        sumTree(key, tree[key], sumPoint, pointTree)    
    return pointTree

if __name__ == "__main__":
    tree = {}
    N, Q = map(int, input().split(' '))
    for i in [input() for i in range(N-1)]:
        A, B = map(int, i.split(' '))
        if A in tree:
            tree[A].append(B)
        else:
            tree[A] = [B]

        if B not in tree:
            tree[B] = []

    point = [0] * (N + 1)
    for i in [input() for i in range(Q)]:
        A, B = map(int, i.split(' '))
        point[A] = point[A] + B

    firstKey = list(tree.keys())[0]
    pointTree = sumTree(firstKey, tree[firstKey], 0)
    print(*pointTree)


### FIXED CODE ###

from collections import deque
 
if __name__ == "__main__":
    N, q = map(int, input().split())
    links = [[] for _ in range(N)]
    
    for i in range(N - 1):
        a, b = map(int, input().split())
        links[a - 1].append(b - 1)
        links[b - 1].append(a - 1)
    
    ans = [0] * N
    for i in range(q):
        p, x = map(int, input().split())
        ans[p - 1] += x

    deq = deque([0])
    visited = [False] * N
    while deq:
        parent = deq.popleft()
        link = links[parent]
        for v in link:
            if not visited[v]:
                ans[v] += ans[parent]
                deq.append(v)
        visited[parent] = True
    
    print(*ans)
N = int(input())
exp = 0

for N >= 2:
  N = N // 2
  exp += 1
  
print(2 ** exp)

### FIXED CODE ###

N = int(input())
exp = 0
 
while N >= 2:
  N = N // 2
  exp += 1
  
print(2 ** exp)
N = int(input())
H = list(map(int, input().split()))

res = []
cnt = 0
for i in range(N-1):
    if H[i+1] <= H[i]:
        cnt += 1
        if i == N - 2:
            res.append(cnt)
    else:
        res.append(cnt)
        cnt = 0
print(max(res))

### FIXED CODE ###

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

res = []
cnt = 0
for i in range(N-1):
    if H[i+1] <= H[i]:
        cnt += 1
        if i == N - 2:
            res.append(cnt)
    else:
        res.append(cnt)
        cnt = 0
if res == []:
    print(0)
else:
    print(max(res))
n,m,p=map(int,input().split())
edge=[]
for i in range(m):
    a,b,c=map(int,input().split())
    edge.append((a,b,p-c))
INF=float('inf')
def bellmanford(s,n):
    d = [INF for i in range(n+1)]
    d[s]=0
    for i in range(n-1):
        for a,b,c in edge:
            if d[b]>d[a]+cost:
                d[b]=d[a]+cost
    for i in range(n-1):
         for a,b,c in edge:
            if d[b]>d[a]+cost:
                d[b]=-INF
    return d
d=bellmanford(1,n)
if d[n]==-INF:
    print(-1)
elif d[n]>=0:
    print(0)
else:
    print(-d[n])

### FIXED CODE ###

n,m,p=map(int,input().split())
edge=[]
for i in range(m):
    a,b,c=map(int,input().split())
    edge.append((a,b,p-c))
INF=float('inf')
def bellmanford(s,n):
    d = [INF for i in range(n+1)]
    d[s]=0
    for i in range(n-1):
        for a,b,c in edge:
            if d[b]>d[a]+c:
                d[b]=d[a]+c
    for i in range(n-1):
         for a,b,c in edge:
            if d[b]>d[a]+c:
                d[b]=-INF
    return d
d=bellmanford(1,n)
if d[n]==-INF:
    print(-1)
elif d[n]>=0:
    print(0)
else:
    print(-d[n])
N, M = map(int, input().split())
a = [int(input()) for i in range(M)] 
z = [0] * (N+1)

def rootCount(x):
     if x in a:
          z[x] = 0
          return 0
     elif x == 0:
          z[x] = 1
          return 1
     elif x == 1:
          z[x] = 1
          return 1
     elif x < N and z[x] != 0:
          return z[x]
     else:
          z[x] = rootCount(x-1) + rootCount(x-2)
          return z[x]
print(rootCount(N) % 1000000007)


### FIXED CODE ###

N, M = map(int, input().split())
z = [-1] * (N+1)
for i in range(M):
     z[int(input())] = 0

for i, x in enumerate(z):
     if i == 0:
          z[i] = 1
     elif i == 1 and z[i] != 0:
          z[i] = 1
     elif z[i] == 0:
          continue
     elif z[i-1] == 0 and z[i-2] == 0:
          print(0)
          exit()
     else:
          z[i] = z[i-1] + z[i-2]
print(z[-1] % 1000000007)
import collections

s = input()
K = int(input())

l = len(s)
sub = set()

if l <= 50:
    for i in range(l):
        for j in range(i+1):
            sub.add(s[j:i+1])
    #print(sub)
    subl = list(sub)
    subl.sort()
    #print(subl)
    print(subl[K-1])

else:
    cl = collections.Counter(s).most_common()
    cl.sort(key=lambda x: x[0])
    print(cl)
    be = cl[0][0]
    for i in range(l):
        if s[i] == be:
            for j in range(K):
                sub.add(s[i:i+j+1])
    #print(sub)
    subl = list(sub)
    subl.sort()
    print(subl[K-1])


### FIXED CODE ###

import collections

s = input()
K = int(input())

l = len(s)
sub = set()

if l <= 50:
    for i in range(l):
        for j in range(i+1):
            sub.add(s[j:i+1])
    #print(sub)
    subl = list(sub)
    subl.sort()
    #print(subl)
    print(subl[K-1])

else:
    cl = collections.Counter(s).most_common()
    cl.sort(key=lambda x: x[0])
    #print(cl)
    d = 0
    while len(sub) < K:
        be = cl[d][0]
        for i in range(l):
            if s[i] == be:
                for j in range(K):
                    sub.add(s[i:min(i+j+1,l)])
        d += 1
    #print(sub)
    subl = list(sub)
    subl.sort()
    print(subl[K-1])
def dfs(v, g, color, paint=0):
	color[v] = paint
	for i in range(len(g)):
		if i == v:
			continue
		if color[i] != -1:
			continue
		if g[v][i]:
			# np = paint if g[v][i] % 2 == 0 else 1 - paint
			dfs(i, g, color, paint)

def resolve():
	n = int(input())
	color = [-1]*n
	g = [[-1]*n for _ in range(n)]
	for _ in range(n-1):
		u, v, w = map(int, input().split())
		g[u-1][v-1] = w
		g[v-1][u-1] = w
	for v in range(n):
		if color[v] > -1:
			continue
		dfs(v, g, color)

	for i in color:
		print(i)

resolve()

### FIXED CODE ###

import sys
sys.setrecursionlimit(100**4)

class Edge():
	def __init__(self, v, w):
		self._v = v
		self._w = w
	def v(self):
		return self._v
	def w(self):
		return self._w

def dfs(v, g, colors, color = 0):
	colors[v] = color
	if not len(g[v]):
		return
	for nv in g[v]:
		if colors[nv.v()] != -1:
			continue
		nc = color if nv.w() % 2 == 0 else 1 - color
		dfs(nv.v(), g, colors, nc)

def resolve():
	n = int(input())
	colors = [-1]*n
	g = [list() for _ in range(n)]
	for _ in range(n-1):
		u, v, w = map(int, input().split())
		g[v-1].append(Edge(u-1, w))
		g[u-1].append(Edge(v-1, w))
	for i in range(n):
		if colors[i] != -1:
			continue
		dfs(i, g, colors)
	for c in colors:
		print(c)
resolve()
S = int(input())
if S%2=0:
    print(0.5)
else:
    print(((N+1)/2)/N)

### FIXED CODE ###

S = int(input())
if S%2==0:
    print(0.5)
else:
    print(((S+1)/2)/S)
import math
a, b = [int(i) for i in input().split()]
r = a - b if a > b else b - a
if r % 2 is 0:
  print(abs(int(r / 2)) + (a if a < b else b))
  else:
    print("IMPOSSIBLE")

### FIXED CODE ###

import math
a, b = [int(i) for i in input().split()]
r = a - b if a > b else b - a
if r % 2 is 0:
  print(abs(int(r / 2)) + (a if a < b else b))
else:
  print("IMPOSSIBLE")
import collections as cl
from math import factorial

def comb(n, r):
  if n >= r:
    return int(factorial(n) / factorial(r) / factorial(n - r))
  elif:
    n == 1:
      return 1:
  else:
    return 0
  
n = int(input())
a = list(map(int, input().split()))

clc = cl.Counter(a)

# 1. 数字が等しいペアを選ぶ総数
npair = 0
for (k, v) in clc.items():
  npair += comb(v, 2)

# 2. (取り除いた数字と同じ数字を選ぶ総数) - (1)
for a_ in a:
  print(npair - (clc[a_] - 1))

### FIXED CODE ###

#!/usr/bin/env python3
import collections as cl
from math import factorial

def comb(n, r):
    if n >= r:
        return factorial(n) // (factorial(n - r) * factorial(r))
    else:
        return 0
  
n = int(input())
a = list(map(int, input().split()))

clc = cl.Counter(a)

# 1. 数字が等しいペアを選ぶ総数
npair = 0
for (k, v) in clc.items():
    npair += comb(v, 2)

# 2. (取り除いた数字と同じ数字を選ぶ総数) - (1)
for a_ in a:
    print(npair - (clc[a_] - 1))
mport itertools
 
N, M, Q = map(int, input().split())
cmb = [list(map(int, input().split())) for _ in range(Q)]
 
def score(seq):
  s = 0
  for q in range(Q):
    if seq[cmb[q][1]-1] - seq[cmb[q][0]-1] == cmb[q][2]:
      s += cmb[q][3]
  return s
 
p = [i for i in range(1, M+1)]
A = itertools.combinations_with_replacement(p, N)
ans = 0
for a in A:
  ans = max(ans, score(a))
print(ans)

### FIXED CODE ###

import itertools
 
N, M, Q = map(int, input().split())
cmb = [list(map(int, input().split())) for _ in range(Q)]
 
def score(seq):
  s = 0
  for q in range(Q):
    if seq[cmb[q][1]-1] - seq[cmb[q][0]-1] == cmb[q][2]:
      s += cmb[q][3]
  return s
 
p = [i for i in range(1, M+1)]
A = itertools.combinations_with_replacement(p, N)
ans = 0
for a in A:
  ans = max(ans, score(a))
print(ans)
n = int(input())
s = input()
t = input()
a=''
for i in range(0,2*n):
    if i % 2 == 0:
        a += s[i//2]
    else:
        a += t[i//2]
print(a)

### FIXED CODE ###

n = int(input())
s,t = [i for i in input().split()]
a=''
for i in range(0,2*n):
    if i % 2 == 0:
        a += s[i//2]
    else:
        a += t[i//2]
print(a)
N=int(input())
his=list(int,input().split())
DP=[]
DP.append(0)
DP.append(his[0]-his[1])
for i in range(2,len(his)):
  DP.append(max(DP[i-1]-his[i],DP[i-2])
print(DP[-1])


### FIXED CODE ###

N=int(input())
his=list(map(int,input().split()))
DP=[]
DP.append(0)
DP.append(abs(his[0]-his[1]))
for i in range(2,N):
  DP.append(min(DP[i-1]+abs(his[i-1]-his[i]),DP[i-2]+abs(his[i-2]-his[i])))
print(DP[-1])
input(a)
 
a ** 2 + a ** 3 + a ** 4 = Z
	print("Z")

### FIXED CODE ###

a = int(input())
print(a + a**2 + a**3)
import numpy as np
import sys

def intinput():
    return map(int,sys.stdin.readline().split())

n,m=intinput()
a = list(intinput())
x = np.zeros((2,m),dtype="int64")
for i in range(m):
    x[0,i],x[1,i]=intinput()
y = np.empty(n+np.sum(x[0]),dtype="int64")
y[0:n]=a
x = x.T
k = 0
for i in x:
    y[n+k:n+k+i[0]]=i[1]
    k+=i[0]
y=np.sort(y)[::-1]
print(np.sum(y[0:n]))

### FIXED CODE ###

import sys

def intinput(): return map(int,sys.stdin.readline().split())

n,m=intinput()
a = list(intinput())
a = [(a[x],1) for x in range(n)]
for i in range(m):
    b,c=intinput()
    a.append((c,b))
a.sort(reverse=1)
res,cnt=0,n
for (x,y) in a:
    k = min(cnt,y)
    res += k*x
    cnt -= k
print(res)
from sys import stdin

str = stdin.readline().rstrip()


cnt = 0
rslt = 0




for a in str:
    flg = 0
    for b in "ATGC":
        if a == b:
            cnt = cnt + 1
            flg = 1
            break
            
    print(a + " :" + str(cnt))
    
    if rslt <= cnt:
        rslt = cnt
        
    if flg == 0:
        cnt = 0


print(rslt)
    
            



### FIXED CODE ###

from sys import stdin

str = stdin.readline().rstrip()


cnt = 0
rslt = 0




for a in str:
    flg = 0
    for b in "ATGC":
        if a == b:
            cnt = cnt + 1
            flg = 1
            break
            
    
    if rslt <= cnt:
        rslt = cnt
        
    if flg == 0:
        cnt = 0


print(rslt)
a,b,c = map(int,input().split())
if a + b == c pr a + c == b or b + c == a:
    print("No")
else:
    print("Yes")


### FIXED CODE ###

a,b,c = map(int,input().split())
if a + b == c or a + c == b or b + c == a:
    print("Yes")
else:
    print("No")
N = int(input())
nums = list(map(int, input().split()))
count = 0
max_count = 0
right = 0
while True:
    if nums[right+1] <= nums[right]:
        count += 1    
    else:
        count = 0
        
    if max_count < count:
        max_count = count
        
    right += 1
    if right == N-1:
        break
    
print(max_count)

### FIXED CODE ###

N = int(input())
nums = list(map(int, input().split()))
count = 0
max_count = 0
right = 0
while True:
    if right == N-1:
        break
    
    if nums[right+1] <= nums[right]:
        count += 1    
    else:
        count = 0
        
    if max_count < count:
        max_count = count
        
    right += 1
    
print(max_count)
h,w,m = map(int,input().split())
h = [0]*m
H = [0]*(h+1)
W = [0]*(w+1)
s = set([])
for i in range(m):
    a,b = map(int,input().split())
    h[i] = [a,b]
    s.add([a,b])

    H[a] += 1
    W[b] += 1

x = [0]*(h+1)
y = [0]*(w+1)
    
for i in range(h+1):
    x[i] = [i,H[i]]
for i in range(w+1):
    y[i] = [i,W[i]]

x.sort(key= lambda val : val[1],reverse=True)
y.sort(key= lambda val : val[1],reverse=True)

ma = x[0][1]
mb = y[0][1]
i,j = 0,0
sw = 0
while 1:
    if (x[i][0],y[j][0]) in s:
        pass
    else:
        sw = 1
        break
    if x[i][1] + y[j][1] != ma+mb:
        break
    
    if x[i+1][1]!= ma:
        j += 1
    else:
        i += 1
print(ma+mb+sw)

### FIXED CODE ###

import time

t0 = time.time()

h,w,m = map(int,input().split())
H = [0]*(h+1)
W = [0]*(w+1)
s = set([])
for i in range(m):
    a,b = map(int,input().split())
    s.add((a,b))

    H[a] += 1
    W[b] += 1

x = [0]*(h+1)
y = [0]*(w+1)
    
for i in range(h+1):
    x[i] = [i,H[i]]
for i in range(w+1):
    y[i] = [i,W[i]]

x.sort(key= lambda val : val[1],reverse=True)
y.sort(key= lambda val : val[1],reverse=True)

ma = x[0][1]
mb = y[0][1]

i,j = 0,0
sw = 0
while 1:
    if j > w:
        break
    if  x[i][1] == ma:
        if (x[i][0],y[j][0]) in s:
            pass
        else:
            if x[i][1]+y[j][1] == ma+mb:
                sw = 1
                break
        i += 1
    else:
        i = 0
        j += 1
    if time.time() - t0 > 2.5:
        break

    
print(ma+mb+sw-1)