#include <bits/stdc++.h>
#include <vector>
#include<math.h>
#include<string.h>
using namespace std;
#define MAX 400005
#define MOD 1000000007
#define SMOD 998244353
#define ROOT 512
#define GMAX 20
#define INF 2000000000000000
#define EPS 0.000000001
#define NIL 0
#define FASTIO ios_base::sync_with_stdio(false);cin.tie(NULL)
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
int arr[MAX];
vector<pair<int,int> > V;
priority_queue<int> pq;
int main()
{
    //freopen("in.txt","r",stdin);
    int n,i;
    scanf("%d",&n);
    long long ans=0;
    for(i=1;i<=n*2;i++)
    {
        scanf("%d",&arr[i]);
        ans=ans+arr[i];
    }
    for(i=n;i>0;i--)
    {
        V.push_back(make_pair(-arr[i],-arr[n*2-i+1]));
    }
    for(i=0;i<V.size();i++)
    {
        pq.push(V[i].first);
        pq.push(V[i].second);
        ans=ans+pq.top();
        pq.pop();
    }
    printf("%lld",ans);
    return 0;
}

#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define pf push_front
#define ft first
#define sec second
#define pr pair<int,int>
#define ISCC ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
using namespace std; 
int t ,n ,m;
ll a[100005] ,k ,sum[100005];
vector<ll> vec;
int sol()
{
	int l = 0 ,r = n+1 ,mid;
	while(l<r)
	{
		mid = (l+r)>>1;
		//cout << sum[mid] << ' ' << l <<'\n';
		if(sum[mid] >= k) r = mid;
		else l = mid+1;
	}
	return l;
}
int main()
{ 
	ISCC;
	cin >> n >> m;
	for(int i=1 ;i<=n ;i++)
	{
		cin >> a[i];
		sum[i] = sum[i-1] + (a[i]-a[i-1]-1);
	}sum[n+1] = sum[n] + (1e18-a[n]-1);
	for(int i=1 ,now ;i<=m ;i++)
	{
		cin >> k;  now = sol()-1;
		cout << a[now] + abs(k-sum[now]) << '\n';
	}
	
	return 0;
}