Igor found out discounts in a shop and decided to buy n items. Discounts at the store will last for a week and Igor knows about each item that its price now is ai, and after a week of discounts its price will be bi.

Not all of sellers are honest, so now some products could be more expensive than after a week of discounts.

Igor decided that buy at least k of items now, but wait with the rest of the week in order to save money as much as possible. Your task is to determine the minimum money that Igor can spend to buy all n items.

Input

In the first line there are two positive integer numbers n and k (1 ≤ n ≤ 2·105, 0 ≤ k ≤ n) — total number of items to buy and minimal number of items Igor wants to by right now.

The second line contains sequence of integers a1, a2, ..., an (1 ≤ ai ≤ 104) — prices of items during discounts (i.e. right now).

The third line contains sequence of integers b1, b2, ..., bn (1 ≤ bi ≤ 104) — prices of items after discounts (i.e. after a week).

Output

Print the minimal amount of money Igor will spend to buy all n items. Remember, he should buy at least k items right now.

Examples

Input

3 1
5 4 6
3 1 5


Output

10


Input

5 3
3 4 7 10 3
4 5 5 12 5


Output

25

Note

In the first example Igor should buy item 3 paying 6. But items 1 and 2 he should buy after a week. He will pay 3 and 1 for them. So in total he will pay 6 + 3 + 1 = 10.

In the second example Igor should buy right now items 1, 2, 4 and 5, paying for them 3, 4, 10 and 3, respectively. Item 3 he should buy after a week of discounts, he will pay 5 for it. In total he will spend 3 + 4 + 10 + 3 + 5 = 25.

/**
 * @author kunal05
 */

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;

public class C779 {
	public static void main(String[] args) {
		InputReader in = new InputReader();
		PrintWriter out = new PrintWriter(System.out);
		final long start = System.currentTimeMillis();
		new Task1().solve(in, out);
		final long duration = System.currentTimeMillis()-start;
		out.close();
	}
	
	static class Pair implements Comparable<Pair>{
		Integer first, second;
		Integer difference;
		public int compareTo(Pair x){
			if(difference.equals(x.difference)){
				if(first.equals(x.first)){
					return second.compareTo(x.second);
				}
				return first.compareTo(x.first);
			}
			return difference.compareTo(x.difference);
		}
	}
	static class Task1 extends Utility{
		public void solve(InputReader in , PrintWriter out){
			int n = in.nextInt(), k = in.nextInt();
			
			Pair[] p = new Pair[n];

			for(int i=0; i<n; i++){
				p[i] = new Pair();
				p[i].first = in.nextInt();
			}

			for(int i=0; i<n; i++){
				p[i].second = in.nextInt();
				p[i].difference = p[i].first-p[i].second;
			}

			Arrays.sort(p);
			long ans = 0;
			for(int i=0; i<k; i++){
				ans += p[i].first;
			}
			for(int i=k; i<n; i++){
				if(p[i].first<=p[i].second){
					ans += p[i].first;
				} else ans += p[i].second;
			}
			out.println(ans);
		}
	}
	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;
		public InputReader() {
			reader = new BufferedReader(new InputStreamReader(System.in));
			tokenizer = null;
		}
		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
		public long nextLong() {
			return Long.parseLong(next());
		}
		public double nextDouble() {
			return Double.parseDouble(next());
		}
		public String nextLine() {
			String s=null;
			try{
				s = reader.readLine();
			} catch(IOException e){
				throw new RuntimeException(e);
			}
			return s;
        }
		public String nextParagraph() {
			String line=null, ans = "";
			try{
				while ((line = reader.readLine()) != null) {
				ans += line;
				}
			} catch(IOException e){
				throw new RuntimeException(e);
			}
			return ans;
		}	
	}
	static class QuickUnion{
		int[] id;
		int[] size;
		public QuickUnion(int n){
			id = new int[n];
			size = new int[n];
			for(int i=0; i<n; i++){
				id[i] = i;
				size[i] = 1;
			}
		}
		public int root(int a){
			while(a!=id[a]){
				id[a] = id[id[a]];
				a = id[a];
			}
			return a;
		}
		public boolean connected(int p, int q){
			return root(p)==root(q);
		}
		public void union(int p, int q){
			int pid = root(p);
			int qid = root(q);
			if(pid==qid) return;
			if(size[pid]>=size[qid]){
				size[pid] += size[qid];
				id[qid] = pid;
			} else {
				size[qid] += size[pid];
				id[pid] = qid;
			}
		}
	}
	static class Utility{
		static final int MOD = 1000000007;
		long expo(long a, long b){
			long result = 1;
			while (b>0){
				if (b%2==1) result=(result*a)%MOD;
				b>>=1;
				a=(a*a)%MOD;
			}
			return result%MOD;
		}
		long fibonacci(long n){
			if(n==0) return 0;
			long a=0, b=1, c=1, d=1, e=n-2;
			long a1, b1, c1, d1, a2=0, b2=1, c2=1, d2=1;
			
			while(e>0){
				if(e%2==1){
					a1 = (a*a2+b*c2)%MOD;
					c1 = (c*a2+d*c2)%MOD;
					b1 = (a*b2+ b*d2)%MOD;
					d1 = (b2*c+ d*d2)%MOD;
					a=a1; b=b1; c=c1; d= d1;
				}
				a1 = (a2*a2+b2*c2)%MOD;
				c1 = (c2*a2+d2*c2)%MOD;
				b1 = (a2*b2+ b2*d2)%MOD;
				d1 = (b2*c2+ d2*d2)%MOD;
				a2=a1; b2=b1; c2=c1; d2= d1;
				e /= 2;
			}
			return d;
		}
		long gcd(long a, long b){
			long mod = b%a;
			while(mod!=0){
				b=a;
				a=mod;
				mod=b%a;
			}
			return a;
		}
		long inverseModullo(long numerator, long denominator){
			return ((numerator%MOD)*(expo(denominator, MOD-2)))%MOD;
		}
	}
	static class KMP {
		private static final int R = 256;		//radix
		private int M;
		private String pat;
		private int[][] dfa;
		public KMP(String pattern){
			this.pat = pattern;
			M = pat.length();
			dfa = new int[R][M];
			dfa[pat.charAt(0)][0] = 1;
			for(int X=0, j=1; j<M; j++){
				for(int c=0; c<R; c++)
					dfa[c][j] = dfa[c][X];		//copy mismatch cases
				dfa[pat.charAt(j)][j] = j+1;	//set match case
				X = dfa[pat.charAt(j)][X];		//update restart state
			}
		}
		public int search(String txt){
			int i,j, N = txt.length();
			for(i=0, j=0; i<N && j<M; i++)
				j = dfa[txt.charAt(i)][j];
			if(j==M) return i-M;
			else return N;
		}
	}
}