Luba has to do n chores today. i-th chore takes a_{i} units of time to complete. It is guaranteed that for every $i \in [ 2 . . n ]$ the condition a_{i} ≥ a_{i} - 1 is met, so the sequence is sorted.

Also Luba can work really hard on some chores. She can choose not more than k any chores and do each of them in x units of time instead of a_{i} ($x < \operatorname{min}_{i = 1}^{n} a_{i}$).

Luba is very responsible, so she has to do all n chores, and now she wants to know the minimum time she needs to do everything. Luba cannot do two chores simultaneously.


-----Input-----

The first line contains three integers n, k, x (1 ≤ k ≤ n ≤ 100, 1 ≤ x ≤ 99) — the number of chores Luba has to do, the number of chores she can do in x units of time, and the number x itself.

The second line contains n integer numbers a_{i} (2 ≤ a_{i} ≤ 100) — the time Luba has to spend to do i-th chore.

It is guaranteed that $x < \operatorname{min}_{i = 1}^{n} a_{i}$, and for each $i \in [ 2 . . n ]$ a_{i} ≥ a_{i} - 1.


-----Output-----

Print one number — minimum time Luba needs to do all n chores.


-----Examples-----
Input
4 2 2
3 6 7 10

Output
13

Input
5 2 1
100 100 100 100 100

Output
302



-----Note-----

In the first example the best option would be to do the third and the fourth chore, spending x = 2 time on each instead of a_3 and a_4, respectively. Then the answer is 3 + 6 + 2 + 2 = 13.

In the second example Luba can choose any two chores to spend x time on them instead of a_{i}. So the answer is 100·3 + 2·1 = 302.

Difficulty: interview

Starter code:

Solutions:
R=lambda:list(map(int,input().split()))
n,k,x=R()
a=list(reversed(R()))
print(sum(x if i < k else a[i] for i in range(n))) 


n, k, x = map(int, input().split())
print(sum([int(x) for x in input().split()][:n - k]) + k * x)

n, k, x = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
print(sum(a[:n - k]) + x * k)

n, k, x = list(map(int, input().split()))
times = list(map(int, input().split()))
for i in range(n - 1, n - k - 1, -1):
    times[i] = x
print(sum(times))


n, k, x = [int(z) for z in input().split()]
dela = [int(z) for z in input().split()]
ans = 0
for i in range(n - k):
    ans += dela[i]
ans += x * k
print(ans)

n,k,x = map(int,input().split())
a = list(map(int,input().split()))
ans = 0
for i in range(n-k): ans += a[i]
ans += k*x
print(ans)

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

arr = list(map(int, input().split()))

res = sum(arr[0:-K])
res += X * K
print(res)


n, k, x = map(int, input().split())
Time = list(map(int, input().split()))

rez = sum(Time[0:n-k]) + k*x
print(rez)

n, k, x = list(map(int,input().split()))
mas = list(map(int,input().split()))
print(k*x + sum(mas[:-k]) )


n, k, x = map(int, input().split())
k = min(k, n)
print(sum([int(s) for s in input().split()][:-k]) + k * x)

# -*- coding: utf-8 -*-

import math
import collections
import bisect
import heapq
import time
import random

"""
created by shhuan at 2017/10/12 22:08

"""


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

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

for i in range(n-1, n-k-1, -1):
    ts[i] = min(ts[i], x)

print(sum(ts))

def numline(f = int):
  return map(f, input().split())
    
n, k, x = numline()
a = [i for i in numline()]
    
print(sum(a[:len(a) - k]) + k * x)

y=input().split()
n = int(y[0])
k=int(y[1])
x=int(y[2])
a=[]
s=0
a=input().split()
for i in range(len(a)-k):
    s+=int(a[i])
s+=k*x
print(s)



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

partial_sum = 0
for i in range(n - k):
    partial_sum += nums[i]

print(partial_sum + k * x)


n, k, x = list(map(int, input().split()))
a = list(map(int, input().split()))

ans = 0
for i in range(n):
    if n - i - 1 < k:
        ans += min(a[i], x)
    else:
        ans += a[i]
print(ans)



n, k, x = list(map(int, input().split()))
a = list(map(int, input().split()))
res = 0
for i in range(n - k):
	res += a[i]
print(res+ k * x)


nkx = [int(i) for i in input().split(' ')]
ai = [int(i) for i in input().split(' ')]
k = nkx[1]
x = nkx[2]
ai = ai[:-k] + [x]*k
print(sum(ai))


n,k,x=map(int,input().split())
nums=list(map(int,input().split()))
for i in range(k):
  nums[n-i-1]=x
print(sum(nums))

R=lambda:list(map(int,input().split()))
n,k,x=R()
a=list(R())
print(sum(a[:n-k])+k*x)



#Problema A
a,b,c = [int(x) for x in input().split()]
tasks = [int(x) for x in input().split()]
print(sum(tasks[:len(tasks)-b])+b*c)

n,k,x=list(map(int,input().split()))
a=list(map(int,input().split()))
a.sort()
a.reverse()
br=0
for i in range(n):
       if i+1<=k:
                   br=br+x
       else:
                   br=br+a[i]
print(br)
       


n,k,x = map(int, input().split())
time = list(map(int, input().split()))
sum = 0
for i in range(n-k):
    sum = time[i] + sum

total = sum + k*x
print(total)

N,K,X = map(int,input().split())
lst = sorted([int(i) for i in input().split()])

for i in range(1,K+1):
    lst[-i] = X
print(sum(lst))

n=input()
xx=n.split()
y=input()
yy=y.split()
su=0
for i in range(0,int(xx[0])-int(xx[1])):
    su+=int(yy[i])
su+=int(xx[1])*int(xx[2])
print(su)


n,k,x=map(int,input().split(' '))
m=list(map(int,input().split(' ')))
e=0
for i in range(n):
    e+=m[i]
for i in range(k):
    j=n-1-i
    if m[j]>x:
        e=e-m[j]+x
print(e)