Harryxun/stf_run huggingface dataset:
s = input()
lens = len(s)
l = 0
r = lens - 1
cnt = 0
while l != r:
  if s[l] == s[r]:
    l += 1
    r -= 1
  elif s[l] == 'x':
    cnt += 1
    l += 1
  elif s[r] == 'x':
    cnt += 1
    r -= 1
  else:
    print(-1)
    exit()
print(cnt)

### FIXED CODE ###

s = input()
lens = len(s)
l = 0
r = lens - 1
cnt = 0
while l != r:
  if s[l] == s[r]:
    l += 1
    r -= 1
    if l > r:
      break
  elif s[l] == 'x':
    cnt += 1
    l += 1
  elif s[r] == 'x':
    cnt += 1
    r -= 1
  else:
    print(-1)
    exit()
print(cnt)
s = input()
l = list(s)
for i in range(0,len(l)-1):
  if(l[i]!= l[i+1]):
    print("Yes")
    break()
  else:
    print("No")
  

### FIXED CODE ###

s = input()
l = list(s)
ans= "No"
for i in range(0,len(l)-1):
  if(l[i]!= l[i+1]):
    ans = "Yes"
    break
print(ans)
import sys
import numpy as np
stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split())) # applies to numbers only
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

N, M = rl()
A = np.array(rl())

B = []
for a in A:
    B.extend(A + a)
B.sort(reverse=True)

answer = B[:M].sum()
print(answer)


### FIXED CODE ###

import sys
import numpy as np

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split())) # applies to numbers only
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

N, M = rl()
A = np.array(rl())
A.sort()

def shake_cnt(x):
    Y = np.searchsorted(A,x-A)
    return N*N - Y.sum()

right = 10 ** 6
left = 0 #握手するのがM人以上
while right > left + 1:
    mid = (left+right) // 2
    if shake_cnt(mid) >= M:
        left = mid
    else:
        right = mid

X = np.searchsorted(A, right-A) #握手しない人数
Acum = np.zeros(N+1, np.int64)
Acum[1:] = A.cumsum()

shake = N*N - X.sum()
happy = (Acum[-1] - Acum[X]).sum() + (A * (N-X)).sum()
happy += (M-shake) * left
print(happy)
n = int(input())
s = input()

ans = 0
for i in range(n):
  for j in range(i, n):
    if s[i:j+1] in s[j+1:]:
      ans = max(ans, j-i+1)
    else:
      break
print(ans)


### FIXED CODE ###

s = input()
if s == 'Sunny':
  print('Cloudy')
elif s == 'Cloudy':
  print('Rainy')
else:
  print('Sunny')
N,K=map(int,input().split())
A=sorted(filter(lambda x:x<K,list(map(int,input().split()))))
N=len(A)
def judge(x):
  DP=1
  Z=(1<<K)-1
  for i in range(N):
    if i!=x:
      DP=((DP|(DP<<A[i]))&Z)
  r=0
  for i in range(K-A[x],K):
    r|=(DP&(1<<i))
  return r

if judge(0):
  print(0)
  exit()
L,R,M=1,N,0
while L!=R:
  M=(L+R)//2
  if judge(M)==0:
    L=max(L+1,M)
  else:
    R=M
print(L)

### FIXED CODE ###

N,K=map(int,input().split())
A=sorted(filter(lambda x:x<K,list(map(int,input().split()))))
N=len(A)
if N==0:
  print(0)
  exit()
def judge(x):
  DP=1
  Z=(1<<K)-1
  for i in range(N):
    if i!=x:
      DP=((DP|(DP<<A[i]))&Z)
  r=0
  for i in range(K-A[x],K):
    r|=(DP&(1<<i))
  return r

if judge(0):
  print(0)
  exit()
L,R,M=1,N,0
while L!=R:
  M=(L+R)//2
  if judge(M)==0:
    L=max(L+1,M)
  else:
    R=M
print(L)
import math
from sys import stdin
N,P=[int(x) for x in stdin.readline().rstrip().split()]
for i in reversed(range(round(math.pow(P,(1/N))+1)):
    tmp=math.pow(i,N-1)
    if P==1:
        ans=1
        break
    if N==1:
        ans=P
        break
    if (P/i)%tmp==0:
        ans=i
        break
print(ans)

### FIXED CODE ###

import math
from sys import stdin
N,P=[int(x) for x in stdin.readline().rstrip().split()]
for i in reversed(range(round(math.pow(P,(1/N)))+1)):
    tmp=math.pow(i,N)
    if P==1:
        ans=1
        break
    if N==1:
        ans=P
        break
    if P%tmp==0:
        ans=i
        break
print(ans)
from scipy import gcd
N = int(input())
A = list(map(int,input().split()))
ans = A[0]
for i in range(N):
    ans = gcd(ans,A[i])
print(ans)

### FIXED CODE ###

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
N = int(input())
A = list(map(int,input().split()))
ans = A[0]
for i in range(1,N):
    ans = gcd(ans,A[i])
print(ans)
def candy():
    boxNum, x = [int(i) for i in input().split()]
    ain = input()
    alist = ain.split(' ')

    s = 0

    for i in range(0, boxNum-1):
        if int(alist[i+1]) + int(alist[i]) > x:
            s = s + (int(alist[i+1]) + int(alist[i]) - x)
            alist[i+1] = x - int(alist[i])
            if alist[i+1] < 0:
                alist[i] = alist[i] + alist[i+1]
                alist[i+1] = 0
        
    print(s)
    
candy()

### FIXED CODE ###

def candy():
    boxNum, x = [int(i) for i in input().split()]
    ain = input()
    alist = ain.split(' ')

    s = 0
    
    for i in range(0, boxNum-1):
        if int(alist[i+1]) + int(alist[i]) > x:
            s = s + (int(alist[i+1]) + int(alist[i]) - x)
            alist[i+1] = x - int(alist[i])
            if int(alist[i+1]) < 0:
                alist[i] = int(alist[i]) + int(alist[i+1])
                alist[i+1] = 0
        
    print(s)
    
candy()
import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

"""
・2,3^n,2
・3(1)
・1
・333
"""

import numpy as np

MOD = 10**9 + 7

N,A,B,C = map(int,readline().split())

if B&1:
    print(0)
    exit()

def cumprod(arr):
    L = len(arr); Lsq = int(L**.5+1)
    arr = np.resize(arr,Lsq**2).reshape(Lsq,Lsq)
    for n in range(1,Lsq):
        arr[:,n] *= arr[:,n-1]; arr[:,n] %= MOD
    for n in range(1,Lsq):
        arr[n] *= arr[n-1,-1]; arr[n] %= MOD
    return arr.ravel()[:L]

U = 10**5
x = np.arange(U,dtype=np.int64); x[0] = 1
fact = cumprod(x)
x = np.arange(U,0,-1,dtype=np.int64); x[0] = pow(int(fact[-1]),MOD-2,MOD)
fact_inv = cumprod(x)[::-1]

"""
・2,3^n,2：B2個
・3113：A-n個
・11：n個
・333333：m個
"""

B2 = B//2

answer = 0
for m in range(C//3+1):
    n_min = max(0,A-C+3*m)
    # (B2+A+m)! / (B2)!(A-n)!(n)!(m)!
    x = fact[B2+A+m] * fact_inv[m] % MOD * fact_inv[B2] % MOD
    x *= fact_inv[A-n_min::-1]; x %= MOD
    x *= fact_inv[n_min:A+1]; x %= MOD
    # 2,3^n,2のところの3の振り分けを決める。B2個の非負整数の和がC-3m-(A-n)
    # (B2+A+m)! / (B2)!(A-n)!(n)!(m)!
    y = fact[B2-1+C-3*m-A+n_min:B2+C-3*m] * fact_inv[B2-1] % MOD
    y *= fact_inv[C-3*m-A+n_min:C-3*m+1]; y %= MOD
    answer += (x*y%MOD).sum()

answer %= MOD

print(answer)

### FIXED CODE ###

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

"""
・2,3^n,2
・3(1)
・1
・333
"""

import numpy as np

MOD = 10**9 + 7

N,A,B,C = map(int,readline().split())

if B&1:
    print(0)
    exit()

def cumprod(arr):
    L = len(arr); Lsq = int(L**.5+1)
    arr = np.resize(arr,Lsq**2).reshape(Lsq,Lsq)
    for n in range(1,Lsq):
        arr[:,n] *= arr[:,n-1]; arr[:,n] %= MOD
    for n in range(1,Lsq):
        arr[n] *= arr[n-1,-1]; arr[n] %= MOD
    return arr.ravel()[:L]

U = 10**5
x = np.arange(U,dtype=np.int64); x[0] = 1
fact = cumprod(x)
x = np.arange(U,0,-1,dtype=np.int64); x[0] = pow(int(fact[-1]),MOD-2,MOD)
fact_inv = cumprod(x)[::-1]

"""
・2,3^n,2：B2個
・3113：A-n個
・11：n個
・333333：m個
"""

B2 = B//2

answer = 0
for m in range(C//3+1):
    if B2 == 0:
        a = C-3*m; b = m; c = A-a
        if a < 0 or c < 0:
            continue
        x = fact[a+b+c] * fact_inv[a] % MOD
        x *= fact_inv[b]; x %= MOD
        x *= fact_inv[c]; x %= MOD
        answer += x
        continue
    n_min = max(0,A-C+3*m)
    # (B2+A+m)! / (B2)!(A-n)!(n)!(m)!
    x = fact[B2+A+m] * fact_inv[m] % MOD * fact_inv[B2] % MOD
    x *= fact_inv[A-n_min::-1]; x %= MOD
    x *= fact_inv[n_min:A+1]; x %= MOD
    # 2,3^n,2のところの3の振り分けを決める。B2個の非負整数の和がC-3m-(A-n)
    # (B2+A+m)! / (B2)!(A-n)!(n)!(m)!
    y = fact[B2-1+C-3*m-A+n_min:B2+C-3*m] * fact_inv[B2-1] % MOD
    y *= fact_inv[C-3*m-A+n_min:C-3*m+1]; y %= MOD
    answer += (x*y%MOD).sum()

answer %= MOD

print(answer)
import sys
input=sys.stdin.readline
n=int(input())
l=[int(input()) for i in range(n-1)]
import collections
d=collections.defaultdict(list)
for i,j in enumerate(l,2):
    d[j].append(i)
def f(a):
    if len(d[a])==0:
        return 0
    else:
        l=[f(i) for i in d[a]]
        l.sort(reverse=True)
        return max([i+l[i]+1 for i in range(len(l))])
print(f(1))

### FIXED CODE ###

import sys
input=sys.stdin.readline
sys.setrecursionlimit(200000)
n=int(input())
l=[int(input()) for i in range(n-1)]
d=[[] for i in range(n+1)]
for i,j in enumerate(l,2):
    d[j].append(i)
l.clear()
def f(a):
    if len(d[a])==0:
        return 0
    l=[f(i) for i in d[a]]
    l.sort(reverse=True)
    return max([i+l[i]+1 for i in range(len(l))])
print(f(1))
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  s=S()
  i_f=0
  i_b=len(s)-1

  ans=0
  while True:
    if i_f==i_b:
      return ans

    if s[i_f]==s[i_b]:
      i_f+=1
      i_b-=1
    else:
      if s[i_f]=='x':
        i_f+=1
        ans+=1
      elif s[i_b]=='x':
        i_b-=1
        ans+=1
      else:
        return -1

# main()
print(main())


### FIXED CODE ###

import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  s=S()
  i_f=0
  i_b=len(s)-1

  ans=0
  while True:
    if i_f>=i_b:
      return ans

    # print(i_f,i_b)
    if s[i_f]==s[i_b]:
      i_f+=1
      i_b-=1
    else:
      if s[i_f]=='x':
        i_f+=1
        ans+=1
      elif s[i_b]=='x':
        i_b-=1
        ans+=1
      else:
        return -1

# main()
print(main())
r = input()

s = r * r * 3.14159265358979
l = 2 * r * 3.14159265358979
 
print(s, end = " ")
print(l)

### FIXED CODE ###

r = float(input())

s = r * r * 3.14159265358979
l = 2 * r * 3.14159265358979
 
print(s, end = " ")
print(l)
K=int(input())
A,B=map(int,input().split())
a=0    
for i in range(A,B,1):
    if i % K ==0:
       print("OK")
        a+=1
       break 
        
if a==0:
   print("NG")
   
        

### FIXED CODE ###

K=int(input())
A,B=map(int,input().split())
a=0    
for i in range(A,B+1):
    if i % K ==0:
       a=1
        
if a==0:
  print("NG")
    
else:
  print("OK")
#coding: utf-8

def solve(a, b, c):
  if a == b + c:
    return "Yes"
  elif b == c + a:
    return "Yes"
  elif c == a + b:
    return "Yes"
  return "No"

print(solve(list(map(int, input().split()))))

### FIXED CODE ###

# coding: utf-8

def solve_a():
    candies = list(map(int, input().split()))
    for c in candies:
        if 2 * c == sum(candies):
            return "Yes"
    return "No"

print(solve_a())
a,op,b=input().split()
a=int(a)
b=int(b)
if op="+":
  print(a+b)
else:
  print(a-b)

### FIXED CODE ###

a,op,b=input().split()
a=int(a)
b=int(b)
if op=="+":
  print(a+b)
else:
  print(a-b)
num_sorted = list(map(int, input().split()))
print("{} {} {}".format(num_sorted.sort()[0], num_sorted.sort()[1], num_sorted.sort()[2]))


### FIXED CODE ###

num_sorted = list(map(int, input().split()))
num_sorted.sort()
print("{} {} {}".format(num_sorted[0], num_sorted[1], num_sorted[2]))
'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineering College
    Date:11/06/2020

'''
from os import path
import sys
from functools import cmp_to_key as ctk
from collections import deque,defaultdict as dd 
from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
from itertools import permutations
from datetime import datetime
from math import ceil,sqrt,log,gcd
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())
abc='abcdefghijklmnopqrstuvwxyz'
abd={'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod=1000000007
#mod=998244353
inf = float("inf")
vow=['a','e','i','o','u']
dx,dy=[-1,1,0,0],[0,0,1,-1]

def bo(i):
    return ord(i)-ord('a')

def solve():
    
    # for _ in range(ii()):
        
    n=ii()
    a=li()
    dp=[inf]*n
    k=2
    dp[0]=0
    for i in range(1,min(n,k)):
        dp[i]=abs(a[i]-a[0])
    for i in range(1,n):
        for j in range(i-1,max(0,i-k)-1,-1):
            dp[i]=min(dp[i],dp[j]+abs(a[i]-a[j]))
    print(dp[n-1])
    
   
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        
        
        
        
if __name__ =="__main__":
    solve()


### FIXED CODE ###

inf = float("inf") 
n=int(input())
a=list(map(int ,input().split()))
dp=[inf]*n
k=2
dp[0]=0
for i in range(1,n):
   for j in range(i-1,max(0,i-k)-1,-1):
       dp[i]=min(dp[i],dp[j]+abs(a[i]-a[j]))
print(dp[n-1])
A,B,C,X = [int(input()) for _ in range(4)]
count = 0
for i in range(A+1):
    for j in range(B+1):
        for k in range(C+1):
            if i+j+k = X
            count += 1
print(count)

### FIXED CODE ###

A,B,C,X = [int(input()) for i in range(4)]
count = 0
for i in range(A + 1):
    for j in range(B + 1):
        for k in range(C + 1):
            if 500 * i + 100 * j + 50 * k == X:
                count += 1
print(count)
from collections import Counter

def add(s, tw):
    if tw in s:
        s[tw] += 1
    else:
        s[tw] = 1

while 1:
    ws, hs, w, h = {}, {}, [], []
    n, m = map(int, raw_input().split())
    if n|m == 0: break

    for i in range(n):
        t = s = input()
        add(ws, s)
        for pw in reversed(w):
            s+=pw
            add(ws, s)
        w.append(t)

    for i in range(m):
        t = s = input()
        add(hs, s)
        for pw in reversed(h):
            s+=pw
            add(hs, s)
        h.append(t)

    ans = 0
    for w, wn in ws.iteritems():
        for h, hn in hs.iteritems():
            if w == h:
                ans += wn * hn

    print ans

### FIXED CODE ###

from collections import defaultdict

while 1:
    ws, hs, w, h = defaultdict(int), defaultdict(int), [], []
    n, m = map(int, raw_input().split())
    if n|m == 0: break

    for i in range(n):
        t = s = input()
        ws[s]+=1
        for pw in reversed(w):
            s+=pw
            ws[s]+=1
        w.append(t)

    for i in range(m):
        t = s = input()
        hs[s]+=1
        for pw in reversed(h):
            s+=pw
            hs[s]+=1
        h.append(t)

    print sum(ws[a] * hs[a] for a in ws if a in hs)
A, B, C = map(int,input().split())

for i in range(B):
  if A * i % B == C:
    print("YES")
    flag = True
    exit()
  else:
    continue

if flag != True:
  print("No")
  


### FIXED CODE ###

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

for i in range(B):
  if A * i % B == C:
    print("YES")
    exit()
  else:
    continue
print("NO")
N = input()
number = input()

a = number.split()
n_list=[]
count=0



for num in a:
    num = int(num)
    if num % 2 == 0:
        n_list.append(num)


if n_list != []:
    maxnum = max(n_list)
    maxnum = maxnum/2
    for num2 in n_list:
        for i in range(maxnum):
            if num2 % 2**(i+1) == 0:
                count+=1


print(count)

### FIXED CODE ###

number = input()
a = number.split()

A=int(a[0])
B=int(a[1])

if A < 9 and B < 9:
    print("Yay!")
else:
    print(":(")
N, M = map(int,input().split())
A = [int(input()) for k in range(M)]
dp = [0 for k in range(N+1)]
MOD = 10**9+7

dp[0] = 1
dp[1] = 1
dp[2] = 1

t = 0
if A[0] == 1:
    t += 1
    dp[1] = 0

for k in range(2,N+1):
    if t < len(A):
        if A[t] == k:
            dp[k] = 0
            t += 1
        else:
            dp[k] = dp[k-1] + dp[k-2]
            dp[k] %= MOD
    else:
        dp[k] = dp[k-1] + dp[k-2]
        dp[k] %= MOD
print(dp[N])


### FIXED CODE ###

N, M = map(int,input().split())
dp = [0 for k in range(N+1)]
MOD = 10**9+7

if M == 0:
    if N == 1:
        print(1)
        exit(0)
    dp[0] = 1
    dp[1] = 1
    dp[2] = 1
    for k in range(2,N+1):
        dp[k] = dp[k-1] + dp[k-2]
        dp[k] %= MOD
    print(dp[N])
else:
    A = [int(input()) for k in range(M)]
    dp[0] = 1
    dp[1] = 1
    dp[2] = 1
    if N == 1:
        if M == 1:
            print(0)
        exit(0)
    else:
        t = 0
        if A[0] == 1:
            t += 1
            dp[1] = 0
        for k in range(2,N+1):
            if t < len(A) and A[t] == k:
                dp[k] = 0
                t += 1
            else:
                dp[k] = dp[k-1] + dp[k-2]
                dp[k] %= MOD
        print(dp[N])
import math

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

a = []
b = []

for i in range(1,1001):
  if math.floor(i*0.08) == A:
    a.append(i)
    
  else:
    pass

for i in range(1,1001):
  if math.floor(i*0.1) == B:
    b.append(i)
    
  else:
    pass
   
a_and_b = set(a) & set(b)

print(min(a_and_b))
  

### FIXED CODE ###

import math

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

a = []
b = []

for i in range(1,1001):
  if math.floor(i*0.08) == A:
    a.append(i)
    
  else:
    pass

for i in range(1,1001):
  if math.floor(i*0.1) == B:
    b.append(i)
    
  else:
    pass
   
a_and_b = set(a) & set(b)


if len(a_and_b) == 0:
  print(-1)
else:
  print(min(a_and_b))
# coding:utf-8

# 入力
N, Q = map(int, input().split(' '))
S = input()
ql = []
for _ in range(Q):
    l, r = map(int, input().split(' '))
    ql.append({'l': l, 'r': r})

# 累積文字和の作成
cl = ['']
for char in S:
    cl.append(cl[-1] + char)

# クエリに対する出力
for i in range(Q):
    print(cl[ql[i]['r']][ql[i]['l']-1:].count('AC'))

### FIXED CODE ###

# coding:utf-8

# 入力
N, Q = map(int, input().split(' '))
S = input()
ql = [map(int, input().split(' ')) for _ in range(Q)]

# 累積和の作成
cl = [0, 0]
for i in range(N-1):
    if S[i] + S[i+1] == 'AC':
        cl.append(cl[-1]+1)
    else:
        cl.append(cl[-1])

# クエリに対する出力
for l, r in ql:
    print(cl[r] - cl[l])
for i in range(1, int(input())+1):
	if len(str(i))%2==1:
		print(len[i])  

### FIXED CODE ###

n = int(input())
ans = 0
for i in range(1,n+1):
    if len(str(i))%2 != 0:
        ans += 1
print(ans)
# coding: utf-8
import sys
sysread = sys.stdin.readline
from heapq import heappop, heappush
from collections import defaultdict
sys.setrecursionlimit(10**7)


    N,M,K = map(int,sysread().split())
    to = [[] for _ in range(N+1)]
    n_to = [0 for _ in range(N + 1)]
    for i in range(1,M+1):
        a,b = map(int, sysread().split())
        #a,b = AB[i]
        to[a].append(b)
        n_to[a] += 1
        to[b].append(a)
        n_to[b] += 1

    stack = defaultdict(lambda:0)
    visited = [False] * (N+1)
    belong = [None] * (N+1)


    def dfs(n):
        _stack = [n]
        visited[n] = True
        while _stack:
            node = _stack.pop()
            stack[n] += 1
            belong[node] = n
            for next in to[node]:
                if not visited[next]:
                    _stack.append(next)
                    visited[next] = True
        return None


    for i in range(1,N+1):
        if not visited[i]:
            dfs(i)

    block = [0 for _ in range(N+1)]
    for i in range(1, K+1):
        c,d = map(int, sysread().split())
        #c, d = CD[i]
        if belong[c] == belong[d]:
            block[c] += 1
            block[d] += 1

    candidates = [0] * (N+1)

    for k in range(1,N+1):
        tr = belong[k]
        candidates[k] = stack[tr] - 1 - n_to[k] - block[k]

    print(' '.join(map(str, candidates[1:])))

if __name__ == "__main__":
    run()

### FIXED CODE ###

# coding: utf-8
import sys
sysread = sys.stdin.readline
from collections import defaultdict
sys.setrecursionlimit(10**7)
def run():

    N,M,K = map(int,sysread().split())
    to = [[] for _ in range(N+1)]
    n_to = [0 for _ in range(N + 1)]
    for i in range(1,M+1):
        a,b = map(int, sysread().split())
        #a,b = AB[i]
        to[a].append(b)
        n_to[a] += 1
        to[b].append(a)
        n_to[b] += 1

    stack = defaultdict(lambda:0)
    visited = [False] * (N+1)
    belong = [None] * (N+1)


    def dfs(n):
        _stack = [n]
        visited[n] = True
        while _stack:
            node = _stack.pop()
            stack[n] += 1
            belong[node] = n
            for next in to[node]:
                if not visited[next]:
                    _stack.append(next)
                    visited[next] = True
        return None


    for i in range(1,N+1):
        if not visited[i]:
            dfs(i)

    block = [0 for _ in range(N+1)]
    for i in range(1, K+1):
        c,d = map(int, sysread().split())
        #c, d = CD[i]
        if belong[c] == belong[d]:
            block[c] += 1
            block[d] += 1

    candidates = [0] * (N+1)

    for k in range(1,N+1):
        tr = belong[k]
        candidates[k] = stack[tr] - 1 - n_to[k] - block[k]

    print(' '.join(map(str, candidates[1:])))

if __name__ == "__main__":
    run()
a,b,x=map(int,input().split())
import math

if x == a**2*b/2:
  print(math.atan(a/b))
elif x < a**2*b/2:
  print(math.atan(2*x/a/b/b))
else:
  print(math.atan((a*a*b-x)**(-1)*a**3/2))


### FIXED CODE ###

a,b,x=map(int,input().split())
import math
 
if x == a**2*b/2:
  print(float(90)-math.degrees(math.atan(a/b)))
elif x == a*a*b:
  print(0)
elif x < a**2*b/2:
  print(float(90)-math.degrees(math.atan(2*x/a/b/b)))
else:
  print(float(90)-math.degrees(math.atan((a*a*b-x)**(-1)*a**3/2)))
import sys
from collections import deque
import copy
import heapq

from math import *

def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [S] =  [(input_raw[0])]
    input_raw = read_func().strip().split()
    [K] = [long(input_raw[0])]
    count = 0;
    for s in S:
        if s != "1":
            break;
        count += 1
    if count >= K:
        print S[K]
    else:
        print S[count]

if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
from collections import deque
import copy
import heapq

from math import *

def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [S] =  [(input_raw[0])]
    input_raw = read_func().strip().split()
    [K] = [long(input_raw[0])]
    count = 0L;
    for s in S:
        if s != "1":
            break;
        count += 1
    if count >= K:
        print S[K-1]
    else:
        print S[count]

if __name__ == '__main__':
    main()
n = int(input())
s = input()
s = sorted(s)
ans = True
if(len(s)>1):
    for i in range(0,len(s),2):
        if(s[i] != s[i+1]):
            ans = False
else:
    ans = False
if(ans):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

n = int(input())
s = input()
s = sorted(s)
ans = True
if(len(s)>1 and len(s)%2 == 0):
    for i in range(0,len(s),2):
        if(s[i] != s[i+1]):
            ans = False
else:
    ans = False
if(ans):
    print("Yes")
else:
    print("No")
monster, hisatu = map(int, input().split())
m_life = list(map(int, input().split()))
count = 0
if hisatu >= len(m_life):
    print(0)
else:
    for range(hisatu):
        m_life.remove(max(m_life))
    for i in m_life:
        count += i
    print(count)


### FIXED CODE ###

monster, hisatu = map(int, input().split())
m_life = list(map(int, input().split()))
m_life.sort()
count = 0
for i in range(len(m_life)-hisatu):
    count += m_life[i]
print(count)