#include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
using vb = vector<bool>;
using vi = vector<int>;
using vl = vector<long long>;
using vvb = vector<vector<bool>>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<long long>>;
using vpii = vector<pair<int, int>>;
using mii = map<int, int>;
template <typename... ArgTypes>
void print(ArgTypes... args);
template <typename... ArgTypes>
void input(ArgTypes &...args);
template <>
void print() {}
template <>
void input() {}
template <typename T, typename... ArgTypes>
void print(T t, ArgTypes... args) {
  cout << t;
  print(args...);
}
template <typename T, typename... ArgTypes>
void input(T &t, ArgTypes &...args) {
  cin >> t;
  input(args...);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, m, impossible = 0;
  cin >> n >> m;
  vl l(m), sum(m + 1, 0);
  for (int i = 0; i < m; i++) {
    cin >> l[i];
    sum[i + 1] = sum[i] + l[i];
    if (l[i] + i > n) impossible = 1;
  }
  if (impossible || sum[m] < n) {
    cout << -1 << endl;
    return 0;
  }
  int last = 1;
  for (int i = 0; i < m; i++) {
    cout << last << " ";
    long long restSum = sum[m] - sum[i + 1];
    if (restSum + last >= n)
      last++;
    else
      last = n - restSum + 1;
  }
  cout << endl;
}
