#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const ll MOD = 1e9+7;
const ll INF = 1e18;
#define rep(i,m,n) for(ll i = (m); i <= (n); i++)
#define zep(i,m,n) for(ll i = (m); i < (n); i++)
#define rrep(i,m,n) for(ll i = (m); i >= (n); i--)
#define print(x) cout << (x) << endl;
#define printa(x,m,n) for(int i = (m); i <= n; i++){cout << (x[i]) << " ";} cout<<endl;

const ll MAX = 100008;
ll n, a[MAX], b[MAX];

int main(){
    cin.tie(0); ios::sync_with_stdio(false);
    
    ll n; cin >> n;
    ll a[n], b[n];
    zep(i, 0, n)cin >> a[i];
    zep(i, 0, n)cin >> b[i];

    ll ans = 0;
    zep(i, 0, n)ans += a[i];

    ll c[2][n / 2];
    
    zep(i, 0, n)c[i % 2][i / 2] = b[i] - a[i];
    sort(c[0], c[0] + n / 2);
    sort(c[1], c[1] + n / 2);
    
    zep(i, 0, n / 2)if(c[0][i] + c[1][i] > 0)ans += c[0][i] + c[1][i];

    print(ans);
    
    return 0;
}
#include <algorithm>  // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <bitset>     // bitset
#include <cctype>     // isupper, islower, isdigit, toupper, tolower
#include <cstdint>    // int64_t, int*_t
#include <cstdio>     // printf
#include <deque>      // deque
#include <iomanip>    // setprecision
#include <iostream>   // cout, endl, cin
#include <map>        // map
#include <queue>      // queue, priority_queue
#include <set>        // set
#include <stack>      // stack
#include <string>     // string, to_string, stoi
#include <tuple>      // tuple, make_tuple
#include <unordered_map>  // unordered_map
#include <unordered_set>  // unordered_set
#include <utility>        // pair, make_pair
#include <vector>         // vector

typedef long long ll;

using namespace std;

// イテレーション
#define rep(i, n) for (ll i = 0; i < ll(n); i++)
#define repk(i, k, n) for (ll i = k; i < ll(n); i++)

// x:コンテナ
#define ALL(vec) vec.begin(), vec.end()
#define SIZE(x) ll(x.size())

#define debug(x) cout << "debug: " << x << endl

// 定数
#define MOD 1000000007
const int INF = 1073741823;
const ll INFL = 1LL << 60;

template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}

template <class T>
bool chmin(T& a, const T& b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}

void solve() {
  //
  ll n;
  int k;

  cin >> n >> k;
  for (int i = 0; i < k; i++) {
    if (n % 200 == 0) {
      n = n / 200;
    } else {
      n = n * 1000 + 200;
    }
  }
  cout << n << "\n";
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);

  solve();

  return 0;
}
