Harryxun/stf_run huggingface dataset:
N,M = map(int,input().split())
X = list(map(int,input().split()))
if N > M :
    print(0)
else:
    flag = [0 for fl in range(M)]
    X.sort()
    for _ in range(1,M):
        flag[_] += X[_] - X[_-1]
   for lp in range(N-1):
        flag.pop(flag.index(max(flag)))
        print(sum(flag))


### FIXED CODE ###

N,M = map(int,input().split())
X = list(map(int,input().split()))
if N > M :
    print(0)
else:
    X.sort()
    x_next = X[0]
    flag = [X[_] - X[_-1] for _ in range(1,M)]
    flag.sort()
    flag = flag[:M-N:]
    print(sum(flag))
from itertools import permutations

N, M = map(int, input().split(" "))
AL = list(map(int, [input() for _ in range(M)]))

patterns = []
for i in range(N, -1, -2):
    pattern = [1] * i
    while sum(pattern) < N:
        pattern.append(2)
    else:
        patterns.extend(set(permutations(pattern)))
import ipdb; ipdb.set_trace()
ans = 0
for pattern in patterns:
    now = 0
    for p in pattern:
        if now + p not in AL:
            now += p
        else:
            break
    else:
        ans += 1
print(ans)


### FIXED CODE ###

N, M = map(int, input().split(" "))
AL = list(map(int, [input() for _ in range(M)]))

# DP
dp = [1] * (N + 1)
for A in AL:
    dp[A] = 0

for i in range(2, N + 1):
    if dp[i] == 1:
        dp[i] = (dp[i-1] + dp[i-2]) % (10**9 + 7)
print(dp[N])
import numpy as np
import fractions
import functools
N, X = map(int, input().split())
x = np.array(sorted(list(map(int, input().split()))))
x =  np.insert(x, np.where(x > X)[0], X) if len(np.where(x > X)) > 0 else np.insert(x, -1, X)
x = np.diff(x)
print(functools.reduce(fractions.gcd, x))

### FIXED CODE ###

import numpy as np
import fractions
import functools
N, X = map(int, input().split())
x = np.array(sorted(list(map(int, input().split()))))
x =  np.insert(x, np.where(x > X)[0][0], X) if len(np.where(x > X)[0]) > 0 else np.append(x, X)
x = np.diff(x)
print(functools.reduce(fractions.gcd, x))
home = [[[0 for r in range(10)] for f in range(3)] for b in range(4)]
n = int(raw_input())
for i in range(n):
    b, f, r, v = map(int, raw_input().split())
    home[b-1][f-1][r-1] += v

for i in range(4):
    for j in range(3):
        print " ".join(map(str, home[i][j]))
        if j == 2 and i != 3


### FIXED CODE ###

n = int(input())
house = [[[0 for i in range(10)] for j in range(3)] for k in range(4)]
for i in range(n):
    b, f, r, v = map(int, input().split())
    house[b-1][f-1][r-1]+=v
    
for i in range(4):
    for j in range(3):
        for k in range(10):
            print(" "+str(house[i][j][k]), end="")
        print()
    if i != 3:
        print("#"*20)
from itertools import permutations

N = int(input())
*P, = map(int, input().split())
*Q, = map(int, input().split())
P = tuple(P); Q = tuple(Q)
for i, t in enumerate(permutations(range(1, N+1))):
    if t == P:
        a = i
    elif t == Q:
        b = i
print(abs(a - b))

### FIXED CODE ###

from itertools import permutations

N = int(input())
*P, = map(int, input().split())
*Q, = map(int, input().split())
P = tuple(P); Q = tuple(Q)
for i, t in enumerate(permutations(range(1, N+1))):
    if t == P:
        a = i
    if t == Q:
        b = i
print(abs(a - b))
N = int(input())
capacity = [int(input()) for _ in range(N)]
b = min(capacity)
if N % b == 0:
    a = N//b
else:
    a = N//b + 1
print(a+4)


### FIXED CODE ###

N = int(input())
capacity = [int(input()) for _ in range(5)]
b = min(capacity)
if N % b == 0:
    a = N//b
else:
    a = N//b + 1
print(a+4)
if(input()) is 0:
print(0)
else:
print(1)

### FIXED CODE ###

if int(input())==1:
    print(0)
else:
    print(1)
import itertools

N = int(input())
x = list(map(int,input().split()))
y = []
CONST = 10**9 + 7
def kaijo(n):
    if n==1:
        return n
    return n * kaijo(n-1)
N_1 = kaijo(N-1)
ans = 0
for i in range(1,N):
    y.append(i)
Y = list(itertools.permutations(y,len(y)))
del_num = []
ok_num = []
#操作のやつ
#iは何回目の操作かを指す
for i in range(1,N):
    prob = 1/(N-i)
    #順列Yの操作フェーズ
    for j in range(len(Y)):
        #存在しうる順列を探す
        for k in range(N-i):
            #N-i番目の値がN-i以下ならばok、存在しうる
            #print(k)
            #print(Y[j])
            if Y[j][k] <= (N-i):
                flag = 1
                if k == (N-i-1):
                    ok_num.append(j)
            else:
                flag = 0
                break
        if flag != 1:
            if j not in ok_num:
                del_num.append(j)
    #存在しない順列を削除していく
    for num in range(len(del_num)):
        del Y[del_num[num]]
ans_list = []
#ansを求めていく
for i in range(len(Y)):
    Y_list = []
    prob = 1
    ans = 0
    x_list = []
    for m in range(len(x)):
        x_list.append(x[m])
    for m in range(len(y)):
        Y_list.append(Y[i][m])
    #ここから
    for j in range(len(y)):
        prob *= 1/(N-(1+j))
        tmp = Y_list[j] - 1

        ans += x_list[tmp+1] - x_list[tmp]
        for k in range(len(y)):
            if tmp < (Y_list[k]):
                Y_list[k] = Y_list[k] - 1
        del x_list[tmp]
    ans = ans * prob
    ans_list.append(ans)

ans = 0
for i in range(len(ans_list)):
    ans += ans_list[i]
ans = ans * N_1
ans = int(ans)
ans = ans % CONST
print(ans)

### FIXED CODE ###

MOD = 10**9+7
N = int(input())
x = list(map(int,input().split()))
x.sort()

kaijo = [1]
for i in range(1,N):
    kaijo.append(kaijo[-1]*i % MOD)

ans = 0
for i in range(N - 1):
    ans = (ans * (i+1) + (x[-1] - x[i]) * kaijo[i]) % MOD

print(ans)
#include <iostream>
#include <cmath>
using namespace std;


int main()
{
  float a, b;

  cin >> a >> b;
  cout << (int)round((a+b)/2) << endl;
  
  return 0;
}


### FIXED CODE ###

import math


def main():
    a, b = map(int, input().split())
    print(math.ceil((a+b)/2))


if __name__ == '__main__':
    main()
N, K = map(int, input().split())
p = [int(x) for x in input().split()]

p_sum = sum(p[:K])
n = 0
for i in range(1, N-K+1):
  a = p_sum - p[i-1] + p[i+K-1]
 if p_sum < a:
   p_sum = a
   n = i

def allsum(x):
  return x * (x+1) // 2

ans = 0
for j in range(K):
  ans += allsum(p[n+j]) / p[n+j]
print(ans)

### FIXED CODE ###

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

a = 0
for i in range(N - K + 1):
  if i == 0:
    b = sum(p[0:K])
  else:
    b = b - p[i-1] + p[i + K - 1]
  
  if b > a:
    a = b
    f = i

ans = 0
for j in range(K):
  ans += (p[f + j] + 1) / 2

print(ans)
data = input().split(" ")
A = input().split(" ")
B = input().split(" ")
total = 0
a = 0
b = 0
j = 0
for i in data:
    data[j] = int(i)
    j += 1
j = 0
for i in A:
    A[j] = int(i)
    j += 1
j = 0
for i in B:
    B[j] = int(i)
    j += 1


for i in range(data[2]):
    data1 = input().split()
    j = 0
    for i in data1:
        data1[j] = int(i)
        j += 1
    data2 = A[data1[0]-1] + B[data1[1]-1] - data1[2]
    if total > data2:
        total = data2

for i in A:
    if a > i:
        a = i
for i in B:
    if b > i:
        b = i

if total > a+b:
    total = a+b

print(total)

### FIXED CODE ###

s = input()
data = len(s)
s = list(s)
j = 0
for i in s:
  if j%2 == 0:
    if i != "h":
      break
  if j%2 == 1:
    if i != "i":
      break
  j += 1

      
if j == data and data%2 == 0:
  print("Yes")
else:
    print("No")
r=input()
a=r*r*math.pi
b=2*r*math.pi
print "%f %f"%(a,b)

### FIXED CODE ###

import math
r=input()
a=r*r*math.pi
b=2*r*math.pi
print "%f %f"%(a,b)
n, q = map(int, input().split())
g=[[] for _ in range(n)]
for i in range(n-1):
    a, b = map(int, input().split())
    g[a-1].append(b-1)
    g[b - 1].append(a - 1)

def dfs(idx):
    visited[idx]=1
    for i in g[idx]:
        if visited[i]==1:
            continue
        costs[i]+=costs[idx]
        dfs(i)
    return

costs = [0]*n
for i in range(q):
    p, x = map(int, input().split())
    costs[p-1]+=x
visited = [0]*n
dfs(0)
print(*costs)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)

#def input():
#  return sys.stdin.readline()[:-1]

n,q=map(int,input().split())
cnt=[0]*(n)
g=[[] for _ in range(n)]
for _ in range(n-1): #木グラフの隣接リストを作成
  a,b=map(int,input().split())
  g[a-1].append(b-1)
  g[b-1].append(a-1)
for _ in range(q):
    a , b = map(int,input().split())
    a = a - 1
    cnt[a] += b

def dfs(now,prev=-1):
  for next in g[now]:
    if next==prev:
      continue
      
    cnt[next]+=cnt[now]
    dfs(next,now)
dfs(0)
print(*cnt)
N = int(input())
S = list(input())
ans = S.count('R')*S.count('G')*S.count('B') 
for i in range(N): 
   if S[i]=='R':
       S[i]=1
   elif S[i]=='G':
       S[i]
   elif S[i]=='B':
       S[i]=4
for i in range(N): 
   for j in range(i+1,N):
     k=2*j-i
     if k>N : 
       continue  
     if S[i]+S[j]+S[k]==7 : 
         ans-=1   
print(ans)

### FIXED CODE ###

N = int(input())
S = list(input())
ans = S.count('R')*S.count('G')*S.count('B') 
for i in range(N): 
   if S[i]=='R':
       S[i] =1
   elif S[i]=='G':
       S[i] =2
   elif S[i]=='B':
       S[i] =4
for i in range(N): 
   for j in range(i+1,N):
     k=2*j-i
     if k>=N : 
       continue  
     if S[i]+S[j]+S[k]==7 : 
         ans-=1 
print(ans)
a, b = list(map(int, input().split()))

if a % 2 == 1 or b % 2 == 1:
  print('No')
  else:
    print('Yes')

### FIXED CODE ###

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

if a % 2 == 1 and b % 2 == 1:
  print('Yes')
else:
  print('No')
#!/usr/bin/env python3
# -*- coding:utf-8 -*-

from collections import defaultdict
import json
from copy import deepcopy

def dfs(graph, s, d, count=0, visited_nodes=None):
  if visited_nodes is None:
    visited_nodes = []
  visited_nodes.append(s)
  if len(graph[s]) == 1:
    d[s] = count
  for t in graph[s]:
    if t in visited_nodes:
      continue
    dfs(graph, t, d, count+1, visited_nodes)

if __name__=='__main__':
  graph = defaultdict(list)
  n, u, v = map(int, input().strip().split())
  for _ in range(n-1):
    ai, bi = map(int, input().strip().split())
    graph[ai].append(bi)
    graph[bi].append(ai)
  du, dv = dict(), dict()
  du[u], dv[v] = 0, 0
  dfs(graph, u, du)
  dfs(graph, v, dv)

  costv = []
  for k in dv.keys():
    if k in du and du[k] < dv[k]:
      costv.append(dv[k])
  print(max(costv) - 1)

### FIXED CODE ###

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

from collections import defaultdict
import json
from copy import deepcopy
import sys
sys.setrecursionlimit(10**4)

def dfs(graph, s):
  dist = [-1 for _ in range(len(graph))]
  dist[s] = 0
  stack = [s]
  while len(stack) != 0:
    s = stack.pop()
    for t in graph[s]:
      dist[t] = dist[s]+1
      if s in graph[t]:
        graph[t].remove(s)
      stack.append(t)
  return dist

if __name__=='__main__':
  graph = defaultdict(list)
  n, u, v = map(int, input().strip().split())
  for _ in range(n-1):
    ai, bi = map(int, input().strip().split())
    graph[ai-1].append(bi-1)
    graph[bi-1].append(ai-1)
  du = dfs(deepcopy(graph), u-1)
  dv = dfs(deepcopy(graph), v-1)
  costv = [0]
  for duv, dvv in zip(du, dv):
    if duv < dvv:
      costv.append(dvv)
  print(max(costv) - 1)
a=int(input())
print(a+a**+a***)

### FIXED CODE ###

a=int(input())
print(a+a*a+a*a*a)
N ,M= map(int,input())
#S = int(input())
if N== M:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

N ,M= map(int,input().split())
#S = int(input())
if N== M:
    print("Yes")
else:
    print("No")
S = (int)raw_input()
list=[S/3600 ,S%3600/60, S%3600%60]
print ':'.join(map(str,list))

### FIXED CODE ###

S = input()
print ':'.join(map(str,[S/3600 ,S%3600/60, S%3600%60]))
x, y, z, k = map(int, input().split())
a =list(map(int, input().split()))
b =list(map(int, input().split()))
c = list(map(int, input().split()))
a.sort(reverse = True)
b.sort(reverse = True)
c.sort(reverse = True)
ab =[]
abc = []
for i in a:
    for j in b:
        ab.append(i+j)
ab.sort(reverse = True)
m = min(K, X*Y)
ab = ab[:m]
for i in ab:
    for j in c:
        abc.append(i +j)
abc.sort(reverse = True)
for i in range(c):
    print(abc[i])

### FIXED CODE ###

x, y, z, k = map(int, input().split())
a =list(map(int, input().split()))
b =list(map(int, input().split()))
c = list(map(int, input().split()))
a.sort(reverse = True)
b.sort(reverse = True)
c.sort(reverse = True)
abc = []
for i in range(x):
    if (i+1) > k:
        break
    for j in range(y):
        if (i+1)*(j+1) > k:
            break
        for h in range(z):
            if (i+1)*(j+1)*(h+1) >k:
                break
            abc.append(a[i] +b[j] +c[h])
abc.sort(reverse = True)
for i in range(k):
    print(abc[i])
R=int(input())
G=int(input())
P=2G-R
print(P)

### FIXED CODE ###

R=int(input())
G=int(input())
P = 2*G-R
print(P)
h, w = map(int, input().split())

a = []
b = list([['#']*(w+2)]*(h+2)) #[]で囲うことが重要


for i in range(h):
    a.append(list(input())) #splitを入れなければOK

for j in range(h):
    for k in range(w)
    b[j+1][k+1] = a[j][k]

print(b)

### FIXED CODE ###

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

sh = '#'

print(sh * (w+2))
[print(sh + input() + sh) for i in range(h)]
print(sh * (w+2))
from collections import deque
import math
mod = 10**9+7
N,K = map(int,input().split())


Kperm =[1,K]
pre = K
for i in range(2,K+1):
    pre = (pre*(K+1-i))%mod
    Kperm.append(pre)


#K-2Pxの計算のメモ化
K_2perm =[1,K-2]
pres = K-2
for i in range(2,K-1):
    pres = (pres*(K-1-i))%mod
    K_2perm.append(pres)

child = [[] for i in range(N)]
for hoge in range(N-1):
    a,b = [int(i)-1 for i in input().split()]#点を0-indexedになおす
    child[a].append(b)
    child[b].append(a)


ans = Kperm[len(child[0])+1]
#DFSしながら塗る
went = [False] * N
queue = deque()
queue.append(0)
went[0] = True
while queue:
    cur = queue.pop()
    if cur!=0:
        ans *= K_2perm[len(child[cur])-1]
        ans %= mod
    for togo in child[cur]:
        if not went[togo]:
            went[togo] = True
            queue.append(togo)
print(ans)



### FIXED CODE ###

from collections import deque
import math
import sys
mod = 10**9+7
N,K = map(int,input().split())

#k
Kperm =[1,K]
pre = K
for i in range(2,K+1):
    pre = (pre*(K+1-i))%mod
    Kperm.append(pre)


#K-2Pxの計算のメモ化
K_2perm =[1,K-2]
pres = K-2
for i in range(2,K-1):
    pres = (pres*(K-1-i))%mod
    K_2perm.append(pres)

child = [[] for i in range(N)]
for hoge in range(N-1):
    a,b = [int(i)-1 for i in input().split()]#点を0-indexedになおす
    child[a].append(b)
    child[b].append(a)

if len(child[0])>=K:
    print(0);sys.exit()
ans = Kperm[len(child[0])+1]
#DFSしながら塗る
went = [False] * N
queue = deque()
queue.append(0)
went[0] = True
while queue:
    cur = queue.pop()
    if cur!=0 and len(child[cur])>=K:
        print(0)
        sys.exit()
    if cur!=0:
        ans *= K_2perm[len(child[cur])-1]
        ans %= mod
    for togo in child[cur]:
        if not went[togo]:
            went[togo] = True
            queue.append(togo)
print(ans)
n = input()
l = len(n)-1

for i in range(2**l):
    op = ["-"]*l
    for j in range(l):
        if (i>>j) &1:
            op[i-j-1]="+"
    formula = ""
    for op_num,op_l in zip(n,op+""):
        formula += op_num + op_l
        if eval(formula)==7:
            print(formula+"=7")
            break

### FIXED CODE ###

def dfs(i, Str, res):
    if i==3:
        if res==7:
            print(Str+"=7")
            exit()
        return
    
    dfs(i+1,Str+"+"+s[i+1],res+int(s[i+1]))
    dfs(i+1,Str+"-"+s[i+1],res-int(s[i+1]))

s=input()
dfs(0,s[0],int(s[0]))
N=int(input())
M=input().split()
for i in range(N):
    M[i]=int(M[i])
S1=0
S2=sum(M)
t=100000
for i in range(N):
    S1+=M[i]
    S2=S2-M[i]
    if t>abs(S2-S1):
        t=abs(S2-S1)
print(t)

### FIXED CODE ###

P,Q,R=map(int,input().split())
a=min(P+Q,P+R,Q+R)
print(a)
i = 1;
while True:
    if((x = int(input())) == 0) break;
    print(f"Case {i}: {x}")


### FIXED CODE ###

i = 1
while True:
    x = int(input())
    if(x == 0): 
        break
    print(f"Case {i}: {x}")
    i += 1
h,w,m=map(int,input().split())
a=[list(map(int,input().split())) for _ in range(m)]
b,c=[0]*h,[0]*w
for t1,t2 in a:
    b[t1-1]+=1
    c[t2-1]+=1
bm,cm=max(b),max(c)
b1,c1=[],[]
d=[]
for x,y in a:
    d.append((x-1,y-1))
d=set(d)
for i in range(h):
    if b[i]==bm:
        b1.append(i)
for i in range(w):
    if c[i]==cm:
        c1.append(i)
f=1
for i in b1:
    for j in c1:
        if (i,j) not in d:
            f=0
print(bm+cm-f)

### FIXED CODE ###

import math
n,x,t=map(int,input().split())
print(math.ceil(n/x)*t)
a,t = input().split()

if a == "H":
  print(b)
else:
  if b == "D":
    print("H")
  else:
    print("D")

### FIXED CODE ###

a,t = input().split()

if a == "H":
  print(t)
else:
  if t == "D":
    print("H")
  else:
    print("D")
while True:
    #n,m = list(map(int,input().split()))
    spam = input()


    print(1)

### FIXED CODE ###

while True:
    try:
        n,m = list(map(int,input().split()))
        if n == 0 and m == 0:
            break
        amari = n % m
        yasai = list(map(int,input().split())) 
        yasai.sort()

        s = 0
        for i in range(n):
            if (i+1) % m > 0:
                s += yasai[-i-1]
        print(s)
    except:
        pass
N = int(input())
if N == 1:
  print("Hello World")
else:
  A,B=list(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)
A = str(input())
B = str(input())
C = str(input())
na = int()
nb = int()
nc = int()
n = 'a'

while na < len(A)+1 and nb < len(B)+1 and nc < len(C)+1:
    if n == 'a':
        if A[na] == 'a':
            na += 1
            n = 'a'
        elif A[na] == 'b':
            nb += 1
            n = 'b'
        elif A[na] == 'c':
            nc += 1
            n = 'c'
    if n == 'b':
        if A[nb] == 'a':
            na += 1
            n = 'a'
        elif A[nb] == 'b':
            nb += 1
            n = 'b'
        elif A[nb] == 'c':
            nc += 1
            n = 'c'
    if n == 'c':
        if A[nc] == 'a':
            na += 1
            n = 'a'
        elif A[nc] == 'b':
            nb += 1
            n = 'b'
        elif A[nc] == 'c':
            nc += 1
            n = 'c'

print(n)

### FIXED CODE ###

from collections import deque
A = deque(list(input()+'A'))
B = deque(list(input()+'B'))
C = deque(list(input()+'C'))

x = A.popleft()
while(True):
    if x == 'a':
        x = A.popleft()
    elif x == 'b':
        x = B.popleft()
    elif x == 'c':
        x = C.popleft()
    else:
        break

print(x)
N = int(input())
if N < 105:
  print(0)
elif 105 <= N < 155:
  print(1)
else:
  print(2)

### FIXED CODE ###

A, B = (int(i) for i in input().split())
C = (A - 1) * (B - 1)
print(C)
s=input()
t=input()
f=0
e=5
flg=0
while e<=len(s):
  tmp=s[f:e]
  for i in range(len(t)):
    if tmp[i]!=t[i] and tmp[i]!='?':
      break
    if i==len(t)-1:
      ans=s[:f]+t+s[e:]
      flg=1
  f+=1
  e+=1
if flg==0:
  print('UNRESTORABLE')
else:
  print(ans.replace('?','a'))

### FIXED CODE ###

s=input()
t=input()
f=0
e=len(t)
flg=0
while e<=len(s):
  tmp=s[f:e]
  for i in range(len(t)):
    if tmp[i]!=t[i] and tmp[i]!='?':
      break
    if i==len(t)-1:
      ans=s[:f]+t+s[e:]
      flg=1
  f+=1
  e+=1
if flg==0:
  print('UNRESTORABLE')
else:
  print(ans.replace('?','a'))
a, b, t = (int(i) for i in input().split()) 

return ((t + 0.5) // a) * b

### FIXED CODE ###

a, b, t = (int(i) for i in input().split()) 

print((t // a) * b)
n,k = map(int,input().split())
d = [0]*k
A = [[0]*k]*n
l = set(range(1,n+1))
for i in range(k):
	d[i] = int(input())
	A[i] = list(map(int,input().split()))
for i in range(k):
	if set(A[i]) == l:
		l = set()
		break
	l = l - set(A[i])
print(len(l))

### FIXED CODE ###

n,k = map(int,input().split())
d = [0]*k
A = [[0]*n]*k
l = set()
for i in range(k):
	d[i] = int(input())
	A[i] = list(map(int,input().split()))
for i in range(k):
	l = l.union(A[i])
if set(range(1,n+1)) == l:
	print(0)
else:
	print(len(set(range(1,n+1))-l))
def getlist_pattern( offset, rstr, N, step ):
  aap = []
  if(N<=0):
    return aap
  
  for i,ch in enumerate(rstr):
    if( ch == "o" ):
      ap = getlist_pattern( offset+i+step+1, rstr[i+step+1:], N-1,step )
      
      if( ap==[] ):
        ap = [[offset+i]]
      else:
      	for j in range(len(ap)):
          ap[j].append(offset+i)
      aap.extend(ap)
  return aap    

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

vstr = input()

pp = getlist_pattern( 0, vstr, k, c )

#print(pp)

for p in pp:
  if(len(p) == k):
    base = p
    break

base.sort()

for ind in base:
  err_flag = 0
  for p in pp:
    if(len(p) == k):
      if( not( ind in p )):
        err_flag = 1
        break
  if( err_flag==0):
  	print( ind+1 )


    

### FIXED CODE ###

k,y,c = map( int, input().split(" "))
ss = input()

asc = []
dsc = []

cnt = 0
err_flg = 0
while( True ):
  if(len(ss) <= cnt):
    err_flg = 1
    break
  if( ss[cnt] == "o"):
    asc.append( cnt )
    cnt += c+1
  else:
    cnt += 1
    
  if( len(asc)==y ):
    break

cnt = 0
ss = ss[::-1]
while( True ):
  if(len(ss) <= cnt):
    err_flg = 1
    break
  if( ss[cnt] == "o"):
    dsc.append( cnt )
    cnt += c+1
  else:
    cnt += 1
    
  if( len(dsc)==y ):
    break
    
for i in range(len(dsc)):
  dsc[i] = len(ss) - dsc[i] - 1
  
dsc.reverse()
#print(asc)
#print(dsc)

if( err_flg == 0 ):
  for i in range(len(asc)):
    if( asc[i] == dsc[i] ):
      print(asc[i]+1)
x=[x for x in input()]
if(x[3]==x[4] and x[5]==x[6]):
    print('Yes')
else:
    print('No')

### FIXED CODE ###

x=input()
if(x[2]==x[3] and x[4]==x[5]):print('Yes')
else:print('No')
import math
n=int(input())
lists=[]
for s in range(n):
    s=int(input())
    lists.append(s)
lists.append(1)
glm=lists[0]
cnt=0
while cnt<n:
    gcd=math.gcd(glm,lists[cnt+1])
    glm=int(glm*lists[cnt+1]/gcd)
    cnt+=1    
print(glm)

### FIXED CODE ###

#早くmathを導入してほしい
from fractions import gcd
n=int(input())
glm=1
for i in range(n):
    nums=int(input())
    glm=int(glm*nums//gcd(nums,glm))
print(glm)
n = int(input())
D = ([int(_) for _ in input().split()])
m = int(input())
T = ([int(_) for _ in input().split()])

d_cnt = [0 for _ in range(200000)]
t_cnt = [0 for _ in range(200000)]

for d in D:
	d_cnt[d] += 1

for t in T:
	t_cnt[t] += 1

for i in range(len(t_cnt)):
	if t_cnt[i] > d_cnt[i]:
		print("NO")
		exit(0)
print("YES")

### FIXED CODE ###

n = int(input())
D = sorted([int(_) for _ in input().split()])
m = int(input())
T = sorted([int(_) for _ in input().split()])

i = 0
for t in T:
	while(D[i] < t):
		i += 1
	if D[i] == t:
		i += 1
	else:
		print("NO")
		exit(0)
print("YES")
A = input()
A = int(A)
P = input()
P = int(P)

X = ( A * 3 + P ) // 2 
print ( X )

### FIXED CODE ###

A,P = map(int,input().split())



a=((P + A * 3) / 2)
print(int(a))
N = int(input())
A = list(map(int, input().split(" ")))
abs_list = list(map(abs, A))
abs_list.sort()
pos = list(filter(lambda x: x > 0, A))
neg = list(filter(lambda x: x < 0, A))
pos.sort()
neg.sort()
# A has 0
if abs_list[0] == 0:
	print(sum(abs_list))
elif len(neg) % 2 == 0:
	print(sum(abs_list))
elif abs(pos[0]) < abs(neg[-1]):
	print(sum(abs_list) - 2*pos[0] - 2*neg[-1])
else:
	print(sum(pos) - sum(neg[:-1]))



### FIXED CODE ###

N = int(input())
A = list(map(int, input().split(" ")))
abs_list = list(map(abs, A))
abs_list.sort()
pos = list(filter(lambda x: x > 0, A))
neg = list(filter(lambda x: x < 0, A))
pos.sort()
neg.sort()

# A has 0
if abs_list[0] == 0:
	print(sum(abs_list))
elif len(neg) % 2 == 0:
	print(sum(abs_list))
elif len(pos) > 0 and abs(pos[0]) < abs(neg[-1]):
	print(sum(abs_list) - 2*pos[0])
else:
	print(sum(abs_list[1:])-abs_list[0])