#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200007;
int main() {
  long long n, m;
  cin >> n >> m;
  long long l[m + 1];
  long long sum = 0;
  for (long long i = 1; i <= m; i++) {
    cin >> l[i];
    if (l[i] + i - 1 > n) {
      cout << -1;
      return 0;
    }
    sum += l[i];
  }
  if (sum < n) {
    cout << -1;
    return 0;
  }
  for (long long i = 1; i <= m; i++) {
    cout << max(i, n - sum + 1) << " ";
    sum -= l[i];
  }
  return 0;
}
