#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;

#define int long long
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>

int32_t main()
{
	int n,q;
	cin>>n>>q;
	ordered_set input;
	for(int i=0; i<n; i++)
	{
		int temp;
		cin>>temp;
		input.insert(temp);
	}    
	while(q--)
	{
		int k;
		cin>>k;
		int ans=k;
		int less = input.order_of_key(ans+1);
		/* 
			3 5 6 7
			k==5
			less = 2
			k==7
			less = 2
			k==9
			less = 0
		*/
		int prev = less;
		while(less!=0)
		{
			ans+=less;
			less = input.order_of_key(ans+1);
			int temp=prev;
			prev=less;
			less-=temp;
		}

		cout<<ans<<endl;
	}
	return 0;
}
#include <bits/stdc++.h>
using namespace std;

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>

int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	long long int n;
	int m;
	cin >> n >> m;
	vector <long long int> v;
	long long int a[m];
	for (int i = 0; i < m; i++) cin >> a[i];
	sort(a, a + m);
	if (m == 0) {
		cout << 1 << "\n";
	}
	else {
		for (int i = 0; i < m; i++) {
			if (i == 0) {
				long long int tmp = a[i] - 1;
				if (tmp) v.push_back(tmp);
			}
			else {
				long long int tmp = a[i] - a[i - 1] - 1;
				if (tmp) v.push_back(tmp);
			}
		}
		if (a[m - 1] != n) {
			v.push_back(n - a[m - 1]);
		}
		sort(v.begin(), v.end());
		if (v.size()) {
			long long int ans = 0;
			long long int tmp = v[0];
			for (auto i : v) {
				ans += (i + tmp - 1) / tmp;
			}
			cout << ans << "\n";
		}
		else cout << 0 << "\n";
	}
	return 0;
}