#include <bits/stdc++.h>
using namespace std;
int n, m;
int l[100005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> m;
  long long sum = 0;
  for (int i = 0; i < m; i++) {
    cin >> l[i];
    sum += l[i];
  }
  if (n > sum || n < m - 1 + l[n - 1]) {
    cout << -1 << '\n';
    return 0;
  }
  long long p = sum - n;
  vector<int> v;
  int cur = 1;
  for (int i = 0; i < m; i++) {
    if (cur + l[i] - 1 > n) {
      cout << -1 << '\n';
      return 0;
    }
    v.emplace_back(cur);
    cur = cur + l[i];
    long long shift = min(p, (long long)l[i] - 1);
    cur -= shift;
    p -= shift;
  }
  for (int i = 0; i < m; i++) {
    cout << v[i] << " \n"[i == m - 1];
  }
}
