#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, i, s = 0, fa = 0;
  cin >> n >> m;
  long long int a[m], b[m];
  vector<long long int> v;
  for (i = 0; i < m; i++) {
    cin >> a[i];
    s += a[i];
  }
  b[m - 1] = a[m - 1];
  for (i = m - 2; i >= 0; i--) b[i] = b[i + 1] + a[i];
  if (s < n) {
    cout << -1 << endl;
    return 0;
  }
  v.push_back(1);
  for (i = 1; i < m - 1; i++) {
    if (n - a[i] + 1 >= i + 1) {
      v.push_back(max(i + 1, n - b[i] + 1));
    } else {
      fa = 1;
      break;
    }
  }
  if (n - a[m - 1] + 1 >= m) {
    v.push_back(n - a[m - 1] + 1);
  } else
    fa = 1;
  if (fa == 1)
    cout << -1 << endl;
  else {
    for (i = 0; i < m; i++) cout << v[i] << " ";
    cout << endl;
  }
  return 0;
}
