#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  long long a[n + 1], sum = 0, f = 0;
  for (int i = 1; i <= m; i++) {
    cin >> a[i], sum += a[i];
    if (i - 1 + a[i] > n) f = 1;
  }
  if (sum < n || f) {
    puts("-1");
    return 0;
  }
  for (long long i = 1; i <= m; sum -= a[i], i++) {
    printf(i == m ? "%lld\n" : "%lld ", max(i, n - sum + 1));
  }
}
