#include <bits/stdc++.h>
using namespace std;
int x[100005];
vector<int> sol;
struct interv {
  int l, r, id;
  interv(int l = 0, int r = 0, int id = 0) {
    this->l = l;
    this->r = r;
    this->id = id;
  }
};
vector<interv> w;
int n, k, id;
char op;
bool cmp(interv a, interv b) {
  if (a.l == b.l) return a.r > b.r;
  return a.l < b.l;
}
void solve() {
  sort(w.begin(), w.end(), cmp);
  int i = 0, r = w[0].r, id = w[0].id;
  while (i < w.size()) {
    while (i < w.size() && w[i].l < r) {
      if (w[i].r > r) return;
      i++;
    }
    if (i < w.size() && w[i].id != id)
      return;
    else {
      r = w[i].r;
    }
  }
  sol.push_back(id);
}
int main() {
  scanf("%d %d ", &n, &k);
  for (int i = 1; i <= k; i++) {
    scanf("%c %d ", &op, &id);
    if (op == '-') {
      w.push_back(interv(x[id], i, id));
      x[id] = -1;
    } else {
      x[id] = i;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (x[i] == 0)
      sol.push_back(i);
    else if (x[i] != -1)
      w.push_back(interv(x[i], k + 1, i));
  }
  solve();
  sort(sol.begin(), sol.end());
  printf("%d\n", sol.size());
  for (int i = 0; i < sol.size(); i++) printf("%d ", sol[i]);
  return 0;
}
