#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e5 + 5;
const int M = 1e6;
const long long INF = (long long)(1e18);
const int inf = 1e9;
const long long MOD = 1000000007LL;
long long n, m;
long long a[MAX_N];
long long ans[MAX_N];
long long suff[MAX_N];
void solve() {}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  long long s = 0LL;
  for (long long i = 1; i <= m; i++) {
    cin >> a[i];
    s += a[i];
  }
  bool ok = true;
  for (long long i = 1; i <= m; i++) {
    if (i - 1 + a[i] > n) {
      ok = false;
      break;
    }
  }
  if (s < n || !ok) {
    cout << -1;
    return 0;
  }
  for (long long i = m; i >= 1; i--) {
    suff[i] = suff[i + 1] + a[i];
    ans[i] = max(i, n - suff[i] + 1);
  }
  for (long long i = 1; i <= m; i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
