#include <bits/stdc++.h>
using namespace std;
int start[123456], fin[123456], M[123456];
char pos[123456], C[123456], rrr[123456];
void solution() {
  int n, m;
  memset(start, 0, sizeof(start));
  memset(fin, 0, sizeof(fin));
  memset(pos, 1, sizeof(pos));
  memset(C, 0, sizeof(C));
  memset(rrr, 0, sizeof(rrr));
  scanf("%d%d", &n, &m);
  char ch, trash[50];
  int x, y;
  int ls = m;
  int lm = -1;
  for (int i = (1); i <= (m); i++) {
    gets(trash);
    scanf("%c%d", &ch, &y);
    M[i] = y;
    C[i] = ch;
    if (ch == '+' && fin[y] == i - 1)
      start[y] = i;
    else if (ch == '+') {
      start[y] = i;
      pos[y] = 0;
    }
    if (!(C[i - 1] == '+' && ch == '+') && M[i] != M[i - 1] && i > 1)
      pos[M[i - 1]] = 0;
    if (ch == '-' && start[y] == 0) {
      lm = i;
      fin[y] = i;
    } else if (ch == '-')
      fin[y] = i;
  }
  for (int i = (m); i >= (1); i--) {
    if (C[i] == '+' && rrr[M[i]] == 0) ls = i;
    rrr[M[i]] = 1;
  }
  for (int i = (1); i <= (lm - 1); i++) pos[M[i]] = 0;
  for (int i = (ls + 1); i <= (m); i++) pos[M[i]] = 0;
  int ans = 0;
  for (int i = (1); i <= (n); i++) ans += pos[i];
  cout << ans << '\n';
  for (int i = (1); i <= (n); i++)
    if (pos[i]) printf("%d ", i);
};
int main() { solution(); }
