#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b) {
  long long ans = 1;
  while (b > 0) {
    if (b & 1) {
      ans = (ans * a);
    }
    a = (a * a);
    b >>= 1;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, m, i, ko = 0;
  cin >> n >> m;
  long long a[m], sum = 0;
  ;
  for (i = 0; i < m; i++) {
    cin >> a[i];
    sum += a[i];
    ko = max(ko, a[i]);
    if (a[i] > n - i) {
      cout << "-1";
      return 0;
    }
  }
  if (sum < n) {
    cout << "-1";
    return 0;
  }
  long long k = sum - n, l = 1;
  int fl = 0;
  for (i = 0; i < m; i++) {
    cout << l << " ";
    l += a[i];
    if (fl) continue;
    if (a[i] > 1) {
      l -= min(a[i] - 1, k);
      k -= min(a[i] - 1, k);
    }
    if (k == 0) fl = 1;
  }
  return 0;
}
