#include <bits/stdc++.h>
using namespace std;
long long int power(long long int a, long long int b, long long int m) {
  long long int ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % m;
    b /= 2;
    a = (a * a) % m;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, m;
  cin >> n >> m;
  vector<long long int> v;
  long long int sum = 0;
  vector<long long int> ans;
  long long int curr = 1;
  for (long long int i = 1; i < 1000; i++)
    for (long long int j = i; j < i; j++)
      ;
  for (long long int i = 1; i < m + 1; i++) {
    long long int x;
    cin >> x;
    v.push_back(x);
    sum += x;
  }
  if (sum < n) {
    cout << -1 << endl;
    return 0;
  }
  long long int more = sum - n;
  vector<long long int> vv = v;
  for (long long int i = 0; i < v.size(); i++) {
    long long int haha = v[i] - 1;
    v[i] -= min(more, haha);
    more -= min(more, haha);
  }
  bool flag = 0;
  for (long long int i = 0; i < m; i++) {
    if ((n - vv[i] + 1) < curr) flag = 1;
    ans.push_back(curr);
    curr = curr + v[i];
  }
  if (flag) {
    cout << -1 << endl;
  } else {
    for (long long int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
    cout << endl;
  }
}
