#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 100;
int L[N], res[N];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  long long sum = 0;
  for (int i = 1; i <= m; i++) {
    cin >> L[i];
    sum += L[i];
  }
  if (sum < n) {
    cout << -1 << endl;
    return 0;
  }
  int ptr = n;
  for (int i = m; i >= 1; i--) {
    int x = n - L[i] + 1;
    res[i] = min(x, ptr);
    if (res[i] < 1) {
      cout << -1 << endl;
      return 0;
    }
    ptr = res[i] - 1;
  }
  int must = 1;
  for (int i = 1; i <= m; i++) {
    if (res[i] > must) {
      res[i] = must;
      must += L[i];
    } else
      break;
  }
  for (int i = 1; i <= m; i++) {
    cout << res[i] << " ";
  }
  return 0;
}
