#include <bits/stdc++.h>
using namespace std;
int ar[100005];
int st[100005];
list<int>::iterator li[100005];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  char second[10];
  int k, pri = 0, now = 0;
  list<int> lis;
  while (m--) {
    scanf("%s%d", second, &k);
    if (second[0] == '+') {
      if (now) {
        ar[k] = 1;
      } else {
        if (pri != k && pri) ar[pri] = 1, ar[k] = 1;
      }
      if (!st[k]) {
        st[k] = 1;
        now++;
        lis.push_back(k);
        li[k] = --lis.end();
      }
    }
    if (second[0] == '-') {
      if (st[k] == 0) {
        if (!now) ar[pri] = 1, pri = k;
        if (now) {
          ar[k] = 1;
          for (list<int>::iterator it = lis.begin(), ed = lis.end(); it != ed;
               ++it) {
            ar[*it] = 1;
            li[*it] = lis.end();
          }
          lis.clear();
        }
      } else {
        now--, st[k] = 0;
        if (now)
          ar[k] = 1;
        else
          pri = k;
        if (li[k] != lis.end()) lis.erase(li[k]);
      }
    }
  }
  int cnt = 0;
  for (int i = 1; i <= n; i++)
    if (!ar[i]) cnt++;
  printf("%d\n", cnt);
  for (int i = 1; i <= n; i++)
    if (!ar[i]) printf("%d ", i);
  return 0;
}
