#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const int INF = 1e9;
bool rec[N];
bool cbl[N];
int em[N];
int qu[N];
int main() {
  ios::sync_with_stdio(false);
  int n, m, temp, pos, cnt, tot, pos1, pre;
  char ch;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    rec[i] = false;
    cbl[i] = true;
    em[i] = INF;
    qu[i] = INF;
  }
  pos = -1;
  pos1 = -1;
  cnt = 0;
  for (int i = 1; i <= m; i++) {
    cin >> ch >> temp;
    if (ch == '+') {
      if (i > 1 && pre != temp) cbl[temp] = false;
      cnt++;
      rec[temp] = true;
      em[temp] = i;
      pos1 = i;
    }
    if (ch == '-') {
      if (rec[temp]) {
        cnt--;
      } else {
        pos = i;
      }
      if (cnt > 0) cbl[temp] = false;
      rec[temp] = false;
      qu[temp] = i;
    }
    pre = temp;
  }
  for (int i = 1; i <= n; i++) {
    if (em[i] < pos || qu[i] < pos) cbl[i] = false;
  }
  for (int i = 1; i <= n; i++) {
    if (qu[i] < pos1 && (em[i] < qu[i] || em[i] == INF)) cbl[i] = false;
  }
  tot = 0;
  for (int i = 1; i <= n; i++) {
    if (cbl[i]) tot++;
  }
  cout << tot << endl;
  for (int i = 1; i <= n; i++) {
    if (cbl[i]) cout << i << " ";
  }
  return 0;
}
