#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long int n, m;
  cin >> n >> m;
  vector<long long int> V(m);
  for (int i = 0; i < m; ++i) cin >> V[i];
  long long int maximum = 0;
  bool possible = true;
  for (int i = 0; i < m; ++i) {
    long long int range = i + 1 + V[i] - 1;
    if (range > n) possible = false;
    maximum = max(maximum, range);
  }
  long long int sum = 0;
  for (int i = 0; i < m; ++i) sum += V[i];
  if (not possible or sum < n)
    cout << -1 << endl;
  else {
    vector<long long int> ans(m);
    long long int left = n - maximum;
    long long int position = 1;
    for (int i = 0; i < m; ++i) {
      cout << position << ' ';
      long long int advance = min(left, V[i] - 1);
      left -= advance;
      position += advance;
      ++position;
    }
    cout << endl;
  }
}
