#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const int MOD = 1e9 + 7;
const int dx[] = {-1, 0, 1, 0, -1, 1, 1, -1};
const int dy[] = {0, 1, 0, -1, 1, 1, -1, -1};
int main() {
  cin.sync_with_stdio(false);
  cin.tie(nullptr);
  int n, m;
  cin >> n >> m;
  int l[100000], mx = 0;
  ll sum = 0;
  for (int i = 0; i < m; ++i) {
    cin >> l[i];
    sum += l[i];
    if (n < i + l[i]) return cout << -1, 0;
    if (sum != i + l[i]) mx = max(mx, i + l[i]);
  }
  if (sum < n) return cout << -1, 0;
  int dif = n - mx;
  sum = 0;
  for (int d = 0, i = 0; i < m; ++i) {
    d = min<ll>(dif, sum - i);
    cout << i + 1 + d << ' ';
    sum += l[i];
  }
  return 0;
}
