#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, m;
  cin >> n >> m;
  long long arr[m];
  long long sum = 0;
  for (long long i = 0; i < m; i++) {
    cin >> arr[i];
    sum += arr[i];
  }
  if (sum < n) {
    cout << -1 << endl;
    return 0;
  }
  long long extra = sum - n;
  vector<long long> p;
  long long s = 1;
  for (long long i = 0; i < m; i++) {
    p.push_back(s);
    if (s + arr[i] - 1 > n) {
      cout << -1 << endl;
      return 0;
    }
    long long olap = min(extra, arr[i] - 1);
    extra -= olap;
    s = s + (arr[i] - olap);
  }
  for (long long i = 0; i < m; i++) {
    cout << p[i] << " ";
  }
}
