#include <bits/stdc++.h>
using namespace std;
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch) && ch != '-') ch = getchar();
  if (ch == '-') f = -1, ch = getchar();
  while (isdigit(ch)) x = (x << 1) + (x << 3) + ch - '0', ch = getchar();
  return x * f;
}
void write(int x) {
  char ch[20];
  int f = 0;
  if (!x) {
    putchar('0'), putchar(' ');
    return;
  }
  if (x < 0) putchar('-'), x = -x;
  while (x) ch[++f] = x % 10 + '0', x /= 10;
  while (f) putchar(ch[f--]);
  putchar(' ');
}
int n, m;
long long l[100007], s[100007], nowlen, p[100007];
int main() {
  n = read(), m = read();
  for (int i = (1); i <= (m); ++i) l[i] = read();
  for (int i = (m); i >= (1); --i) s[i] = s[i + 1] + l[i];
  if (s[1] < n || m + l[m] - 1 > n) {
    write(-1);
    return 0;
  }
  for (int i = (1); i <= (m); ++i) {
    if (nowlen + s[i] >= n) {
      nowlen++, p[i] = nowlen;
    } else {
      nowlen = n - s[i] + 1;
      p[i] = nowlen;
    }
    if (p[i] > n - l[i] + 1) {
      write(-1);
      return 0;
    }
  }
  for (int i = (1); i <= (m); ++i) write(p[i]);
  return (~(0 - 0) + 1);
}
