#include <bits/stdc++.h>
#pragma comment(linker, "/stack:30000000")
using namespace std;
const int Direction[8][2] = {{-1, 0},  {0, 1},  {1, 0}, {0, -1},
                             {-1, -1}, {1, -1}, {1, 1}, {-1, 1}};
const int Nmax = 300100;
int OpenPair[Nmax];
int ClosePair[Nmax];
int used[Nmax], Size[Nmax];
pair<int, int> Event[Nmax];
int LastNonZero[Nmax];
int main() {
  ios_base::sync_with_stdio(0);
  int n, m;
  cin >> n >> m;
  for (int i = 1; i < (int)(n + 1); ++i) used[i] = 1;
  for (int i = 1; i < (int)(n + 1); ++i) OpenPair[i] = ClosePair[i] = -1;
  Size[0] = 0;
  for (int i = 1; i < (int)(m + 1); ++i) {
    char ch;
    int x;
    cin >> ch >> x;
    if (ch == '+')
      Event[i] = make_pair(1, x);
    else
      Event[i] = make_pair(0, x);
    if (Event[i].first == 0 && used[Event[i].second]) Size[0]++;
    if (Event[i].first == 1 && used[Event[i].second]) OpenPair[i] = 0;
    used[Event[i].second] = 0;
  }
  vector<int> Liders;
  for (int i = 1; i < (int)(n + 1); ++i)
    if (used[i]) Liders.push_back(i);
  set<int> Answer;
  for (int i = 1; i < (int)(n + 1); ++i) used[i] = -1, Answer.insert(i);
  for (int i = 1; i < (int)(m + 1); ++i) {
    if (Event[i].first == 0 && used[Event[i].second] == -1)
      used[Event[i].second] = i;
    if (Event[i].first == 1 && used[Event[i].second] != -1) {
      OpenPair[i] = used[Event[i].second];
      ClosePair[used[Event[i].second]] = i;
      used[Event[i].second] = -1;
    }
  }
  for (int i = 1; i < (int)(n + 1); ++i)
    if (used[i] != -1) ClosePair[used[i]] = m + 1;
  for (int i = 1; i < (int)(m + 1); ++i) {
    Size[i] = Size[i - 1];
    if (Event[i].first == 1)
      Size[i]++;
    else
      Size[i]--;
  }
  if (Size[0] == 0)
    LastNonZero[0] = -1;
  else
    LastNonZero[0] = 0;
  for (int i = 1; i < (int)(m + 1); ++i)
    if (Size[i] != 0)
      LastNonZero[i] = i;
    else
      LastNonZero[i] = LastNonZero[i - 1];
  for (int i = 1; i < (int)(m + 1); ++i)
    if (Event[i].first == 0) {
      int start = i, last = ClosePair[i];
      if (last == -1) continue;
      int position = LastNonZero[last - 1];
      if (position >= start) Answer.erase(Event[i].second);
    } else {
      int start = OpenPair[i], last = i;
      if (start == -1 || start > 0) continue;
      int position = LastNonZero[last - 1];
      if (position >= start) Answer.erase(Event[i].second);
    }
  cout << Answer.size() << endl;
  for (set<int>::iterator it = Answer.begin(); it != Answer.end(); ++it)
    cout << (*it) << " ";
  cout << endl;
  return 0;
}
