#include <bits/stdc++.h>
using namespace std;
const int base = 100003;
const int maxn = 100005;
int n, a[maxn];
int sum, x, k;
void Solve() {
  cin >> n >> k >> x;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  int ans;
  for (int i = n; i >= n - k + 1; --i) {
    ans += a[i];
  }
  ans = min(ans, k * x);
  for (int i = 1; i <= n - k; ++i) ans += a[i];
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  if (fopen("CF"
            ".inp",
            "r")) {
    freopen(
        "CF"
        ".inp",
        "r", stdin);
    freopen(
        "CF"
        ".out",
        "w", stdout);
  }
  int test = 1;
  while (test--) {
    Solve();
  }
}
