#include <bits/stdc++.h>
using namespace std;
int a[100010][2], stat[100010], judge[100010];
int m, n;
char ch[2];
int main() {
  scanf("%d%d", &m, &n);
  memset(stat, 0, sizeof(stat));
  int ans = 0, latest = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%s%d", ch, &a[i][1]);
    if (ch[0] == '-') {
      a[i][0] = 0;
      if (!stat[a[i][1]]) latest = i;
      stat[a[i][1]] = 0;
    } else {
      a[i][0] = 1;
      stat[a[i][1]] = 1;
    }
  }
  memset(stat, 0, sizeof(stat));
  int online = 0;
  for (int i = 1; i < latest; i++) {
    if (a[i][0]) {
      online++;
      stat[a[i][1]] = 1;
    } else if (stat[a[i][1]]) {
      online--;
      stat[a[i][1]] = 0;
    }
    judge[a[i][1]] = 2;
  }
  if (online) judge[a[latest][1]] = 2;
  int first = 0;
  if (latest) first = a[latest][1];
  for (int i = latest + 1; i <= n; i++) {
    if (a[i][0]) {
      online++;
      if (online == 1) {
        if (!first)
          first = a[i][1];
        else if (a[i][1] != first) {
          judge[first] = 2;
          judge[a[i][1]] = 2;
        }
      } else
        judge[a[i][1]] = 2;
      stat[a[i][1]] = 1;
    } else {
      stat[a[i][1]] = 0;
      online--;
      if (online) judge[a[i][1]] = 2;
    }
  }
  int tot = 0;
  for (int i = 1; i <= m; i++)
    if (!judge[i]) tot++;
  printf("%d\n", tot);
  for (int i = 1; i <= m; i++)
    if (!judge[i]) printf("%d ", i);
  printf("\n");
  return 0;
}
