#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int N = 1e5;
int n, m;
vector<int> l;
vector<int> p;
int main() {
  scanf("%d%d", &n, &m);
  register long long sum = 0;
  l.resize(m + 7), p.resize(m + 7);
  for (register int i = 1; i <= m; i++) {
    scanf("%d", &l[i]);
    sum += l[i];
  }
  if (sum < n) return puts("-1"), 0;
  register int dec;
  sum -= n, l[0] = 1;
  for (register int i = 1; i <= m; i++) {
    dec = min(sum, (long long)l[i - 1] - 1);
    p[i] = p[i - 1] + l[i - 1] - dec;
    if (p[i] + l[i] - 1 > n) return puts("-1"), 0;
    sum -= dec;
  }
  for (register int i = 1; i <= m; i++) printf("%d%c", p[i], "\n "[i < m]);
  return 0;
}
