#include <bits/stdc++.h>
using namespace std;
const int NMAX = 1e5;
int N, M;
int l[NMAX + 5];
int main() {
  cin >> N >> M;
  bool ok = true;
  long long sumL = 0LL;
  for (int i = 1; i <= M; i++) {
    cin >> l[i];
    sumL += 1LL * l[i];
    if (l[i] > N - i + 1) ok = false;
  }
  if (sumL < N) ok = false;
  if (ok == false) {
    cout << -1 << '\n';
    return 0;
  }
  int tryPos = 1;
  for (int i = 1; i <= M; i++) {
    if (tryPos + sumL - 1 >= N) {
      cout << tryPos << ' ';
      tryPos++;
    } else {
      int delay = N - sumL + 1;
      cout << delay << ' ';
      tryPos = delay + 1;
    }
    sumL -= l[i];
  }
  return 0;
}
