#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
long long dx[] = {-1, 0, 1, 0, -1, -1, 1, 1};
long long dy[] = {0, 1, 0, -1, -1, 1, 1, -1};
char dir[] = {'U', 'R', 'D', 'L'};
void solve() {
  long long n, m, tot = 0;
  cin >> n >> m;
  vector<long long> ans(m + 1);
  pair<long long, long long> l[m + 1];
  for (long long i = 1; i <= m; i++) {
    cin >> l[i].first;
    tot += l[i].first;
    l[i].second = i;
  }
  if (tot < n) {
    cout << -1;
    return;
  }
  long long overlap = tot - n;
  long long idx = 1;
  for (long long i = 1; i <= m; i++) {
    ans[i] = idx;
    if (idx + l[i].first - 1 > n) {
      cout << -1;
      return;
    }
    long long inc = l[i].first;
    if (overlap > 0) {
      long long take = min(l[i].first - 1, overlap);
      overlap -= take;
      inc -= take;
    }
    idx += inc;
  }
  for (long long i = 1; i <= m; i++) {
    cout << ans[i] << " ";
  }
  return;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long q = 1;
  for (long long i = 0; i < q; i++) {
    solve();
    cout << "\n";
  }
  return 0;
}
