#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N;
  int M;
  cin >> N >> M;
  vector<long long> l(M);
  long long L = 0;
  for (int i = 0; i < M; i++) {
    cin >> l[i];
    L += l[i];
  }
  long long R = L - N;
  if (R < 0) {
    cout << -1 << endl;
    return 0;
  }
  vector<long long> dup(M, 0);
  for (int i = 1; i < M; i++) {
    dup[i] = min(l[i - 1] - 1, R);
    R -= dup[i];
  }
  if (R > 0) {
    cout << -1 << endl;
    return 0;
  }
  vector<long long> ans(M);
  ans[0] = 1;
  for (int i = 1; i < M; i++) {
    ans[i] = (ans[i - 1] + l[i - 1]) - dup[i];
    if (ans[i] + l[i] - 1 > N) {
      cout << -1 << endl;
      return 0;
    }
  }
  for (int a : ans) {
    cout << a << " ";
  }
  cout << endl;
}
