#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  vector<long long> a;
  long long sum = 0;
  long long maxx = 0;
  for (long long i = 0; i < m; i++) {
    long long x;
    cin >> x;
    a.push_back(x);
    maxx = max(maxx, x);
    sum += x;
  }
  if (a[m - 1] + m - 1 > n) {
    cout << "-1\n";
    return 0;
  }
  if (sum < n) {
    cout << "-1\n";
    return 0;
  }
  long long ans[m];
  for (long long i = 0; i < m; i++) {
    ans[i] = max(n - sum + 1, i + 1);
    sum -= a[i];
    if (ans[i] > (n - a[i] + 1)) {
      cout << "-1\n";
      return 0;
    }
  }
  for (long long i = 0; i < m; i++) cout << ans[i] << " ";
  return 0;
}
