#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ii = pair<int, int>;
const int N = 1e5 + 666;
int t[N], a[N], n, m;
int f[N];
vector<ii> pr[N], ab[N];
vector<int> solve() {
  vector<int> start(n + 1, 0);
  for (int i = 1; i <= m; i++) {
    if (t[i])
      start[a[i]] = i;
    else {
      pr[a[i]].push_back({start[a[i]], i});
      start[a[i]] = 0;
    }
  }
  for (int i = 1; i <= n; i++)
    if (start[i]) {
      pr[i].push_back({start[i], m + 1});
    }
  for (int i = 1; i <= n; i++) {
    for (ii u : pr[i]) {
      f[u.first]++;
      f[u.second]--;
    }
  }
  for (int i = 1; i <= m; i++) f[i] += f[i - 1];
  for (int i = 1; i <= m; i++) f[i] = (f[i] > 0);
  for (int i = 1; i <= m; i++) f[i] += f[i - 1];
  auto check = [&](int l, int r) { return f[r - 1] - f[l - 1] > 0; };
  for (int i = 1; i <= n; i++) {
    auto& u = pr[i];
    auto& v = ab[i];
    if (u.empty()) continue;
    if (u.front().first > 0) v.push_back({0, u.front().first});
    for (int j = 0; j < (int)(u).size() - 1; j++) {
      v.push_back({u[j].second, u[j + 1].first});
    }
    if (u.back().second <= m) v.push_back({u.back().second, m + 1});
  }
  vector<int> res;
  for (int i = 1; i <= n; i++) {
    bool can = true;
    for (ii z : ab[i]) {
      if (check(z.first, z.second)) {
        can = false;
        break;
      }
    }
    if (can) res.push_back(i);
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  char s;
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    cin >> s >> a[i];
    t[i] = (s == '+');
  }
  auto v = solve();
  cout << (int)(v).size() << '\n';
  for (int i = 0; i < (int)(v).size(); i++)
    cout << v[i] << (i == (int)(v).size() - 1 ? '\n' : ' ');
}
