#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const int N = 1e5 + 1;
const int ln = 30;
vector<pair<int, int> > g[N];
vector<pair<int, int> > lo[N];
long long bit[ln * N], lazy[ln * N];
bool visit[N];
void update_range(int start, int end, int l, int r, int ind, int val) {
  if (!lazy[ind]) {
    bit[ind] += (end - start + 1) * lazy[ind];
    if (start != end) {
      lazy[2 * ind + 2] += lazy[ind];
      lazy[2 * ind + 1] += lazy[ind];
    }
    lazy[ind] = 0;
  }
  if (start > end || r < start || l > end) return;
  if (start >= l && end <= r) {
    bit[ind] += (end - start + 1) * val;
    if (start != end) {
      lazy[2 * ind + 1] += val;
      lazy[2 * ind + 2] += val;
    }
    return;
  }
  int mid = (start + end) / 2;
  update_range(start, mid, l, r, 2 * ind + 1, val);
  update_range(mid + 1, end, l, r, 2 * ind + 2, val);
  bit[ind] = bit[2 * ind + 1] + bit[2 * ind + 2];
}
long long query_range(int start, int end, int l, int r, int ind) {
  if (start > end || r < start || l > end) return 0;
  if (lazy[ind] != 0) {
    bit[ind] += (end - start + 1) * lazy[ind];
    if (start != end) {
      lazy[2 * ind + 1] += lazy[ind];
      lazy[2 * ind + 2] += lazy[ind];
    }
    lazy[ind] = 0;
  }
  if (start >= l && end <= r) return bit[ind];
  int mid = (start + end) / 2;
  return query_range(start, mid, l, r, 2 * ind + 1) +
         query_range(mid + 1, end, l, r, 2 * ind + 2);
}
int main() {
  int n, m;
  scanf("%d", &n);
  scanf("%d", &m);
  for (int i = 1; i < m + 1; i++) {
    char c;
    cin >> c;
    if (c == '+') {
      int a;
      cin >> a;
      if (g[a].size() == 0) {
        lo[a].push_back(make_pair(0, i - 1));
      } else {
        lo[a].push_back(make_pair(g[a][g[a].size() - 1].second, i - 1));
      }
      g[a].push_back(make_pair(1, i));
    } else {
      int a;
      scanf("%d", &a);
      if (g[a].size() == 0) {
        update_range(0, m, 0, i - 1, 0, 1);
      } else {
        update_range(0, m, g[a][g[a].size() - 1].second, i - 1, 0, 1);
      }
      g[a].push_back(make_pair(0, i));
    }
  }
  for (int i = 1; i < n + 1; i++) {
    if (g[i].size() == 0) continue;
    int len = g[i].size();
    if (g[i][len - 1].first == 1) {
      update_range(0, m, g[i][len - 1].second, m, 0, 1);
    } else {
      lo[i].push_back(make_pair(g[i][len - 1].second, m));
    }
  }
  memset(visit, true, sizeof(visit));
  for (int i = 1; i < n + 1; i++) {
    for (pair<int, int> x : lo[i]) {
      long long a = query_range(0, m, x.first, x.second, 0);
      if (a >= 1) {
        visit[i] = false;
      }
    }
  }
  vector<int> ans;
  for (int i = 1; i < n + 1; i++)
    if (visit[i]) ans.push_back(i);
  printf("%d\n", ans.size());
  for (int x : ans) cout << x << " ";
  if (ans.size() > 0) cout << endl;
  return 0;
}
