Harryxun/stf_run huggingface dataset:
N = int(input())
P = list(map(int,input().split()))
#PS = [i for i in range(1,N+1)]

cnt = 0
i = 0
idx = []
while i < N:
    if P[i] == i+1:
        if P[i+1] == i+2:
            cnt += 1
            i += 1
        else:
            cnt += 1
                   
    i += 1   
print(cnt)
    
    

### FIXED CODE ###


N = int(input())
P = list(map(int,input().split()))
#PS = [i for i in range(1,N+1)]

cnt = 0
i = 0
while i < N:
    if P[i] == i+1:
        if i < N-1 and P[i+1] == i+2:
            cnt += 1
            i += 1
        else:
            cnt += 1
                   
    i += 1   
print(cnt)
R=input()
if R<1200:
  print("ABC")
elif R>=1200 and R<2800:
  print("ARC")
elif R>=2800:
  print("AGC")

### FIXED CODE ###

R=int(input())
if R<1200:
  print("ABC")
elif R>=1200 and R<2800:
  print("ARC")
elif R>=2800:
  print("AGC")
a, b = list(map(int, split.()))
print(a*b, 2*(a+b))

### FIXED CODE ###

a, b = list(map(int, input().split()))
print(a * b, 2*(a + b))
N = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
yes = 'Possible'
no = 'Impossible'

if N == 2:
    if a[0] != 1 and a[1] != 1:
        print(no)
        exit()
if a[-1] !=  (a[0] + 1) // 2:
    print(no)
    exit()
else:
    if a[0] % 2 == 0:
        if a[-2] == a[-1]:
            print(no)
            exit()
    else:
        if a[-3] == a[-1]:
            print(no)
            exit()

ok = [0] * N
for i in range(N):
    ok[a[i]] += 1
for i in range(a[-1] + 1, a[0] + 1):
    if ok[i] < 2:
        print(no)
        exit()

print(yes)


### FIXED CODE ###

N = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
yes = 'Possible'
no = 'Impossible'

if N == 2:
    if a[0] != 1 and a[1] != 1:
        print(no)
        exit()
    else:
        print(yes)
        exit()
if a[-1] != (a[0] + 1) // 2:
    print(no)
    exit()
else:
    if a[0] % 2 == 0:
        if a[-2] == a[-1]:
            print(no)
            exit()
    else:
        if a[-3] == a[-1]:
            print(no)
            exit()

ok = [0] * N
for i in range(N):
    ok[a[i]] += 1
for i in range(a[-1] + 1, a[0] + 1):
    if ok[i] < 2:
        print(no)
        exit()

print(yes)
n, m = map(int, raw_input().split())
c = map(int, raw_input().split())

INF = 1000000000

t = [INF] * n
t[0] = 0

for i in range(m):
    # print(c[i])
    for j in range(c[i], n):
        t[j] = min([t[j], t[j - c[i]] + 1])
    # print(t)

print(t[n - 1])
~

### FIXED CODE ###

n, m = map(int, raw_input().split())
c = map(int, raw_input().split())

INF = 1000000000

t = [INF] * (n + 1)
t[0] = 0

for i in range(m):
    for j in range(c[i], n + 1):
        t[j] = min([t[j], t[j - c[i]] + 1])

print(t[n])
def main():
	n, a, b = [int(i) for i in input().split()]
    ans = 0
    for i in range(1,n+1):
        tmp = 0
        for ss in str(i):
            tmp += int(ss)
        if a <= tmp <= b:
            ans += tmp
    print(ans)


if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    n, a, b = [int(i) for i in input().split()]
    ans = 0
    for i in range(1,n+1):
        tmp = 0
        for ss in str(i):
            tmp += int(ss)
        if a <= tmp <= b:
            ans += i
    print(ans)


if __name__ == '__main__':
    main()
#AGC-040
S = input()
A = [0] * (len(S) + 1)

def check_left(n, S):
    count = 0
    for i in reversed(range(0, n)):
        if S[i] == "<":
            count += 1
        else:
            break
    return count

def check_right(n, S):
    count = 0
    for i in range(n, len(S)):
        if S[i] == ">":
            count += 1
        else:
            break
    return count

for i in range(len(S)+1):
    if i > 0 and A[i-1] != 0:
        if S[i-1] == ">":
            if S[i+1] == "<":
                A[i] = 0
            else:
                A[i] = A[i-1] - 1
        else:
            A[i] = A[i-1] + 1
    else:
        A[i] = max(check_left(i, S), check_right(i, S))
    
print(sum(A))

### FIXED CODE ###

S = input()
N = len(S) + 1
 
A = [0] * N
 
if S[0] == '<':
    A[0] = 0

if S[-1] == '>':
    A[-1] = 0

for i in range(1, N-1):
    if S[i-1] == '>' and S[i] == '<':
        A[i] = 0

for i in range(N-1):
    if S[i] == '<':
        A[i+1] = A[i] + 1

for i in range(N-1)[::-1]:
    if S[i] == '>':
        A[i] = max(A[i], A[i+1] + 1)

print(sum(A))
#2つの正整数a, bの積の偶奇判定
a,b = list(map(int,input().split()))

c = a*b
if c % 2 == 0:
    print (Even)
else:
    print(Odd)
    

### FIXED CODE ###

#2つの正整数a, bの積の偶奇判定
a,b = map(int,input().split())

if (a*b) % 2 == 0:
    print ("Even")
else:
    print ("Odd")
import sys
def input():
    return sys.stdin.readline()[:-1]
import math
from itertools import permutations, combinations
from collections import deque

sys.setrecursionlimit(10**7)
N = int(input())
ab = [list(map(int, input().split())) for _ in range(N-1)
edges = [[] for _ in range(N)]
for abi in ab:
    a, b = abi[0], abi[1]
    edges[a-1].append(b-1)
    edges[b-1].append(a-1)

K = max(list(map(len, edges)))
print(K)

adjm = [[0]*N for _ in range(N)]

Q = deque()
for edge in edges[0]:
    Q.append((0, edge))

while Q:
    labels = set(i for i in range(1, K+1))
    points = Q.popleft()
    p0, p1 = points

    set1 = set(adjm[p0])
    can_use_labels = labels - set1
    use_label = can_use_labels.pop()

    adjm[p0][p1] = use_label
    adjm[p1][p0] = use_label

    for p in edges[p1]:
        if p != p0:
            Q.append((p1, p))

for abi in ab:
    a, b = abi[0], abi[1]
    print(adjm[a-1][b-1])


### FIXED CODE ###

#import numpy as np
from copy import deepcopy
import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial#, gcd
from bisect import bisect_left #bisect_left(list, value)
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
def pri(x): print('\n'.join(map(str, x)))

N = int(input())
#AB = [list(map(int, input().split())) for _ in range(N-1)]
edge = [[] for i in range(N)]
seen = [0]*N
colors = [0]*(N-1)
#for val in AB:
for i in range(N-1):
    x, y = list(map(int, input().split()))
    edge[x-1].append((i, y-1))
    edge[y-1].append((i, x-1))

lenedge = [len(val) for val in edge]
mledge = max(lenedge)
root = lenedge.index(mledge)
print(mledge)


que = deque()
que.append([(root, -1)])
while que[0]:
    nque = []
    cque = que.popleft()
    #print('cstack:', cstack)
    for tupl in cque:
        index, pcolor = tupl
        seen[index] = 1
        color = 1
        if (color == pcolor): color += 1
        for tupl2 in edge[index]:
            findex, edgei = tupl2
            if seen[edgei] == 0:
                nque.append((edgei, color))
                colors[findex] = color
                color += 1
                if (color == pcolor): color += 1
    que.append(nque)

#pri(color)

for color in colors:
    print(color)
n,m=map(int,input().split( ))
line=list(map(int,input().split( )))s


L=[]
R=[]
for i in range(m):
    l,r=map(int,input().split( ))
    L.append(l)
    R.append(r)

print(max(min(R)-max(L)+1,0))



### FIXED CODE ###

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

L=[]
R=[]
for i in range(m):
    l,r=map(int,input().split( ))
    L.append(l)
    R.append(r)

print(max(min(R)-max(L)+1,0))
N, K = map(int, input().split())
li = list(map(int, input().split()))

i=1
k=0

while K > k:
  i = li[i-1]
  k = 1 + k

print(i)

### FIXED CODE ###

S = list(input())
T = list(input())

T.pop(-1)
if S == T:
  print('Yes')
else:
  print('No')
S = input()
T = input()
A = int(input())
B = int(input())
U = input()

if(S == U):
  print(A - 1)
elif(T == U):
  print(B - 1)

### FIXED CODE ###

S, T = input().split()
A, B = map(int, input().split())
U = input()
 
if S == U :
  print(str(A - 1) + ' ' + str(B))
elif T == U :
  print(str(A) + ' ' + str(B - 1))
A,B,C=map(int,input().split())

print (int(C,A,B).split)


### FIXED CODE ###

A,B,C=map(int,input().split())

print (C,A,B)
import math
import functools
def resolve():
    N,x=map(int,input().split())
    X=list(map(int,input().split()))
    X.append(x)
    X=list(set(X))
    X.sort()
    D=[]
    for i in range(len(X)-1):
        D.append(X[i+1]-X[i])
    gcd = functools.reduce(math.gcd, D)
    print(gcd)
resolve()


### FIXED CODE ###

def gcd(a, b):
    while a > 0:
        if a < b:
            a, b = b, a
        a = a % b
    return b
def resolve():
    N,x=map(int,input().split())
    X=list(map(int,input().split()))
    X.append(x)
    X=list(set(X))
    X.sort()
    D=[]
    for i in range(len(X)-1):
        D.append(X[i+1]-X[i])
    ans=D[0]
    for d in D:
        if d%ans!=0:
            ans=gcd(ans,d)
    print(ans)
resolve()
import sys
from math import factorial

N = int(input())
S = input()

if S[0] == 'W' or S[-1] == 'W':
    print(0)
    sys.exit()

op = "L"
for i in range(1, 2*N):
    if S[i] == S[i-1]:
        op += 'R' if op[i-1] == 'L' else 'L'
    else:
        op += 'R' if op[i-1] == 'R' else 'L'

if op.count('L') != N:
    print(0)
    sys.exit()

ct_L, ans = 0, 1

for i in op:
    if i == 'L':
        ct_L += 1
    else:
        ans *= ct_L
        ct_L -= 1
    ans %= mod

mod = 10**9+7
print(factorial(N) * ans % mod)


### FIXED CODE ###

import sys
from math import factorial

N = int(input())
S = input()
mod = 10**9+7

if S[0] == 'W' or S[-1] == 'W':
    print(0)
    sys.exit()

op = "L"
for i in range(1, 2*N):
    if S[i] == S[i-1]:
        op += 'R' if op[i-1] == 'L' else 'L'
    else:
        op += 'R' if op[i-1] == 'R' else 'L'

if op.count('L') != N:
    print(0)
    sys.exit()

ct_L, ans = 0, 1

for i in op:
    if i == 'L':
        ct_L += 1
    else:
        ans *= ct_L
        ct_L -= 1
    ans %= mod


print(factorial(N) * ans % mod)
import numpy as np

s = input().split()
H = int(s[0])
N = int(s[1])

m = np.array([list(map(int, input().split())) for i in range(N)])
A = m[:, 0]
B = m[:, 1]

def func(H, m):
    A = m[:, 0]
    B = m[:, 1]

    if H < A[i]:
        i = np.argmin((H // A) * B)
        return (H // A[i]) * B[i]
    else:
        i = np.argmax(A / B)
        H_next = H - (H // A[i]) * B[i] 
        return (H // A[i]) * B[i] + func(H_next)
        
        func(H_next, )
        j = np.argmin(B)
        print((H // A[i])*B[i] + B[j])

print(func(H, m))

### FIXED CODE ###

s = input().split()
H = int(s[0])
A = int(s[1])

ans = H // A
if H % A:
    print(ans+1)
else:
    print(ans)
a, b, c = map(int, input().split())
d, e, f = map(int, input().split())
g, h, i = map(int, input().split())
num_count = int(input())
number_list = [0] * num_count
for i in range(num_count):
    number_list[i] = int(input())

bingo_map = [[a, b, c], [d, e, f], [g, h, i]]
bingo_answer = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]

def bingo(bingo_map, number_list):
    for number in number_list:
        for i, bingo_row in enumerate(bingo_map):
            if number in bingo_row:
                for j, bingo_number in enumerate(bingo_row):
                    if bingo_number == number:
                        bingo_answer[i][j] = 1


def check_bingo():
    return (all(bingo_answer[0]) or all(bingo_answer[1]) or all(bingo_answer[2]) or
    all(bingo_answer[0][0], bingo_answer[1][0], bingo_answer[2][0]) or
    all(bingo_answer[0][1], bingo_answer[1][1], bingo_answer[2][1]) or
    all(bingo_answer[0][2], bingo_answer[1][2], bingo_answer[2][2]) or
    all(bingo_answer[0][0], bingo_answer[1][1], bingo_answer[2][2]) or
    all(bingo_answer[2][0], bingo_answer[1][1], bingo_answer[0][2]))

bingo(bingo_map, number_list)

if (check_bingo()):
    print("Yes")
else:
    print("No")


### FIXED CODE ###

a, b, c = map(int, input().split())
d, e, f = map(int, input().split())
g, h, x = map(int, input().split())
num_count = int(input())
number_list = [0] * num_count
for i in range(num_count):
    number_list[i] = int(input())

bingo_map = [[a, b, c], [d, e, f], [g, h, x]]
bingo_answer = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]

def bingo(bingo_map, number_list):
    for number in number_list:
        for i, bingo_row in enumerate(bingo_map):
            if number in bingo_row:
                for j, bingo_number in enumerate(bingo_row):
                    if bingo_number == number:
                        bingo_answer[i][j] = 1


def check_bingo():
    return (all(bingo_answer[0]) or all(bingo_answer[1]) or all(bingo_answer[2]) or
    all([bingo_answer[0][0], bingo_answer[1][0], bingo_answer[2][0]]) or
    all([bingo_answer[0][1], bingo_answer[1][1], bingo_answer[2][1]]) or
    all([bingo_answer[0][2], bingo_answer[1][2], bingo_answer[2][2]]) or
    all([bingo_answer[0][0], bingo_answer[1][1], bingo_answer[2][2]]) or
    all([bingo_answer[2][0], bingo_answer[1][1], bingo_answer[0][2]]))

bingo(bingo_map, number_list)

if (check_bingo()):
    print("Yes")
else:
    print("No")
N, Q = map(int, input().split())
S = input()
l = []
r = []
for i in range(Q):
    li, ri = map(int, input().split())
    l += [li]
    r += [ri]

for ind in range(Q):
    substr = S[max(0, l[ind]-1) : min(r[ind], N)]
    print(len(re.findall("AC", S)))

### FIXED CODE ###

N, Q = map(int, input().split())
S = input()
l = []
r = []
for i in range(Q):
    li, ri = map(int, input().split())
    l += [li]
    r += [ri]

S_tf = [0]*(N+1)
for ind in range(N):
    S_tf[ind + 1] = S_tf[ind] + (1 if S[ind:ind+2] == "AC" else 0)
for ind in range(Q):
    print(S_tf[max(0, r[ind]-1)] - S_tf[min(l[ind]-1, N)])
import sys
    sys.setrecursionlimit(10**8)
        
    def treetrace(i):
      score = [-1] * (n + 1)
      if src[i] == 0:
        return point[i]
      elif score[i] != -1:
        return score[i]
      else:
        score[i] = point[i] + treetrace(src[i])
        return score[i]
      
    tmp = list(map(int, (input().split())))
    n = tmp[0]
    q = tmp[1]
     
    src = [0] * (n + 1)
    for i in range(1, n):
      tmp = list(map(int, (input().split())))
      src[tmp[1]] = tmp[0]
     
    point = [0] * (n + 1)
    for i in range(1, q+1):
      tmp = list(map(int, (input().split())))
      point[tmp[0]] += tmp[1]
      
    for i in range(1, n + 1):
      print(treetrace(i), end=" ")

### FIXED CODE ###

tmp = list(map(int, (input().split())))
n = tmp[0]
q = tmp[1]

#edge = defaultdict(list)
edge = [[] for i in range(n+1)]
fixed = [False] * (n + 1)
fixed[1] = True
point = [0] * (n + 1)

for i in range(1, n):
  tmp = list(map(int, (input().split())))
  edge[tmp[0]].append(tmp[1])
  edge[tmp[1]].append(tmp[0])

for i in range(1, q+1):
  tmp = list(map(int, (input().split())))
  point[tmp[0]] += tmp[1]

que = []
que += edge[1]
frm = 1

while len(que) != 0:
  cur = que.pop()
  for i in edge[cur]:
    if fixed[i]:
      point[cur] += point[i]
    else:
      que.append(i)
  fixed[cur] = True

for i in range(1, n+1):
  print (point[i], end=" ")
N,W = map(int,input().split())
w = [0]*(N+1)
v = [0]*(N+1)
for i in range(1,N+1): w[i],v[i] = map(int,input().split())

dp = [[0]*(W+1) for _ in range(N+1)]
for i in range(1,N+1):
    for j in range(1,W+1):
        if j < w[j]: dp[i][j] = dp[i-1][j]
        else: dp[i][j] = max(dp[i-1][j],dp[i-1][j-w[j]]+v[j])
print(dp[N][W])

### FIXED CODE ###

n,W = map(int,input().split())
w = [0]*n
v = [0]*n
for i in range(n):
    w[i],v[i] = map(int,input().split())

dp = [[0 for _ in range(n+1)] for _ in range(W+1)]
for i in range(1,W+1):
    for j in range(1,n+1):
        if i-w[j-1] >= 0:
            dp[i][j] = max(dp[i-w[j-1]][j-1]+v[j-1],dp[i][j-1])
        else:
            dp[i][j] = dp[i][j-1]

print(dp[W][n])
n, l = map(int, input().split())
s = 0
for i in range(1, n + 1):
    s += l + i - 1

x = 1 - l
if x <= n and x >= i:
    print(s)
else:
    a = L
    b = L + n - 1
    if abs(a) < abs(b):
        print(s - a)
    else:
        print(s - b)

### FIXED CODE ###

n, l = map(int, input().split())
s = 0
for i in range(1, n + 1):
    s += l + i - 1
 
x = 1 - l
if x <= n and x >= 1:
    print(s)
else:
    a = l
    b = l + n - 1
    if abs(a) < abs(b):
        print(s - a)
    else:
        print(s - b)
import sys
from math import sqrt

nyu = sys.stdin.read()
nyu = nyu.split("\n")
cheese = map(float,nyu[0].split())
cheese.sort()
supk = sqrt((cheeze[0]/2)**2 + (cheeze[1]/2)**2)
nyu = nyu[2:]
for k in nyu:
	if k < supk: print "OK"
	else: print "NA"

### FIXED CODE ###

import sys
nyu = sys.stdin.read()
nyu = map(int,nyu.split())
for n in nyu:
   	ans = []
	for b in [512,256,128,64,32,16,8,4,2,1]:
		if n >= b:
			n -= b
			ans.append(b)
	ans.reverse()
	ans = map(str,ans)
	ans = ' '.join(ans)
	print ans
#C
import math

N = int(input())


count = [0] * 10050
for j in range(1, 105):
    for k in range(1, 105):
        for l in range(1, 105):
            v = (j+k+l) ** 2 - (j*k + k*l + l*j)
            if v <= 10050:
                count[v] += 1

for i in range(1, N):
    print(count[i])

### FIXED CODE ###

#C
N = int(input())

count = [0] * 10050
for j in range(1, 105):
    for k in range(1, 105):
        for l in range(1, 105):
            v = (j+k+l) ** 2 - (j*k + k*l + l*j)
            if v < 10050:
                count[v] += 1

for i in range(1, N+1):
    print(count[i])
eList = [chr(i) for i in range(97, 97+26)]
N = int(input())

n = N
mod = N
numList = []

while n > 0:
    n, mod = divmod(n, 26)
    if mod != 0:
        # 末尾ではなく先頭に追加する
        # 1のくらいから判定して行っているため
        numList.insert(0, mod - 1)
    else:
        numList.insert(0, 25)
        # 26進数のようで26まで数字があるため調整する
        n -= 1

ans = ''
for num in numList:
    ans += eList[num]
print(ans)

### FIXED CODE ###

a = input()
if str.isupper(a):
    print("A")
else:
    print("a")
n = int(input())
a = list(map(int, input().split()))
req = [0] * n
req[-1] = a[-1]
for i in range(2, n+1):
    req[-i] = req[-(i-1)] + a[-i]
l = [0] * (n + 1)
l[0] = 1
for i in range(1, n+1):
    M = (l[i-1] - a[i-1]) * 2
    l[i] = min(M, req[i-1])
if l[-1] < a[-1]:
    print(-1)
else:
    print(sum(l))


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
if n == 0:
    if a[0] == 1:
        print(1)
    else:
        print(-1)
else:
    req = [0] * n
    req[-1] = a[-1]
    for i in range(2, n+1):
        req[-i] = req[-(i-1)] + a[-i]
    l = [0] * (n + 1)
    l[0] = 1
    for i in range(1, n+1):
        M = (l[i-1] - a[i-1]) * 2
        l[i] = min(M, req[i-1])
    if l[-1] < a[-1]:
        print(-1)
    else:
        print(sum(l))
A,B = int(i) for i in input().split()
if A+B >= 10:
    print("error")
else:
    print(A+B)

### FIXED CODE ###

A,B = (int(i) for i in input().split())
if A+B >= 10:
    print("error")
else:
    print(A+B)
inf = float('inf')

def distance(p,n,x,y):
    D = 0.0
    s = []
    for i in range(0,n):
        s.append(x[i]-y[i])
        if s[i]<0.0:
            s[i]*=-1.0
        D += s[i]**p 
        
    if p==inf:
        return max(s)
    else:
        return D**(1.0/p)

if __name__ == '__main__':
    n = int(input())
    x = []
    y = []

    for i in range(0,n):
        x.append(int(input()))
    for i in range(0,n):
        y.append(int(input()))
        
    print float(distance(1,n,x,y))
    print float(distance(2,n,x,y))
    print float(distance(3,n,x,y))
    print float(distance(inf,n,x,y))

### FIXED CODE ###

inf = float('inf')

def distance(p,n,x,y):
    D = 0
    s = []
    for i in range(0,n):
        s.append(x[i]-y[i])
        if s[i]<0.0:
            s[i]*=-1.0
        D += s[i]**p 
        
    if p==inf:
        return max(s)
    else:
        return D**(1.0/p)

if __name__ == '__main__':
    n = int(input())
    x = map(int,raw_input().split())
    y = map(int,raw_input().split())
        
    print float(distance(1,n,x,y))
    print float(distance(2,n,x,y))
    print float(distance(3,n,x,y))
    print float(distance(inf,n,x,y))
import sys
sys.setrecursionlimit(10000000000000000000000000000000)

def process():
    data = []
    for line in get_data():
        line = line.split()
        if len(line) == 2:
            if line[0] == line[1] == '0':
                data = []
                continue
            H = int(line[0])
            W = int(line[1])
        elif len(line) == 0:
            pass
        else:
            data.append(line[0])
            if len(data) == H:
                field = create_field(H, W)
                print search(H, W, data, field)


def search(H, W, data, field):
    count = 0
    for i in xrange(H):
        for j in xrange(W):
            if field[i][j] == 0:
                continue
            count += 1
    return count


def _search(i, j, H, W, cell, data, field):
    field[i][j] = 0
    for a in xrange(i-1, i+2):
        if -1 < a < H:
            pass
        else:
            continue
        for b in xrange(j-1, j+2):
            if -1 < b < W:
                pass
            else:
                continue

            if a != i and b != j:
                continue

            if field[a][b] == 0:
                continue
            if cell == data[a][b]:
                _search(a, b, H, W, cell, data, field)
    return


def create_field(H, W):
    field = []
    for i in xrange(H):
        raw = []
        for j in xrange(W):
            raw.append(1)
        field.append(raw)
    return field


def get_data():
    return [line.strip() for line in raw_input()]

process()

### FIXED CODE ###

import sys
sys.setrecursionlimit(100000000)


def main():
    solve()


def solve():
    for data in get_dataset():
        print search(data)


def search(data):
    count = 0
    H = len(data)
    W = len(data[0])
    for i in xrange(H):
        for j in xrange(W):
            if data[i][j] == '.':
                continue
            _search(i, j, H, W, data[i][j], data)
            count += 1
    return count


def _search(i, j, H, W, cell, data):
    data[i][j] = '.'
    for a in xrange(i-1, i+2):
        if not -1 < a < H:
            continue
        for b in xrange(j-1, j+2):
            if not -1 < b < W:
                continue

            if a != i and b != j:
                continue

            if data[a][b] == '.':
                continue

            if cell == data[a][b]:
                _search(a, b, H, W, cell, data)
    return


def get_dataset():
    dataset = []
    while True:
        line = raw_input().rstrip().split()
        H = int(line[0])
        if H == 0:
            break

        data = []
        for i in xrange(H):
            data.append(list(raw_input().rstrip()))
        dataset.append(data)
    return dataset


if __name__ == '__main__':
    main()
N = int(input())
if N == 1:
    print("Hello World")
else:
    A,B = map(int, input().split())
    print(A+B)

### FIXED CODE ###

N = int(input())
if N == 1:
    print("Hello World")
else:
    A = int(input())
    B = int(input())
    print(A+B)
MOD = 10**9+7
S = input()
l = len(S)
dp = [[0] * 13 for _ in range(l+1)]
p = 10
dp[1][int(S[-1])] = 1
for i in range(1, l):
  if(S[l-i-1] != '?'):
    pi = (p * int(S[l-i-1])) % 13
    for j in range(13):
      dp[i+1][(j+pi)%13] = (dp[i+1][(j+pi)%13] + dp[i][j])%MOD
  else:
    for k in range(10):
      pi2 = p*k%13
      for j in range(13):
        dp[i+1][(j+pi2)%13] = (dp[i+1][(j+pi2)%13]+dp[i][j])%MOD
  p = (p*10)%MOD    
print(dp[l][5])

### FIXED CODE ###

MOD = 10**9+7
S = input()
l = len(S)
dp = [[0] * 13 for _ in range(l+1)]
dp[0][0] = 1
p = 1
for i in range(l):
  if(S[i] != '?'):
    n = int(S[i])
    for j in range(13):
      dp[i+1][(j*10+n)%13] += dp[i][j]
  else:
    for k in range(10):
      for j in range(13):
        dp[i+1][(j*10+k)%13] += dp[i][j]
  for j in range(13):
    dp[i+1][j] = dp[i+1][j]%MOD
  p = (p*10)%MOD    
print(dp[l][5])
str = input()
list = str.split()
a, b = list

c = a*b
if c%2 == 0:
    print(Even)
else
    print(Odd)



### FIXED CODE ###

a, b = map(int, input().split())
print('Even' if a*b%2 == 0 else 'Odd')
import sys
sys.setrecursionlimit(2000000)

N = int(input())
NUMS = [int(input()) for _ in range(N)]
NUMS = list(set(NUMS))

def gcd(num1, num2):
    if num2 == 0:
        return num1
    else:
        return gcd(num2, num1 % num2)


res = NUMS[0]
for num in NUMS[1:]:
    res = res  * num / gcd(res, num)

print(int(res))

### FIXED CODE ###

import sys
import fractions
sys.setrecursionlimit(200000000)

N = int(input())
NUMS = [int(input()) for _ in range(N)]
NUMS = list(set(NUMS))

def gcd(num1, num2):
    if num2 == 0:
        return num1
    else:
        return gcd(num2, num1 % num2)


res = NUMS[0]
for num in NUMS[1:]:
    res = res * num // fractions.gcd(res, num)

print(int(res))