#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > ve[111111];
vector<int> res;
int num[111111];
int val[111111], vis[111111];
struct st {
  int l, r, sum1, sum2;
  int tot;
} tree[111111 << 2];
int number[2][111111];
int index1[111111];
int dp[111111];
void build(int left, int right, int index) {
  tree[index].l = left, tree[index].r = right;
  tree[index].sum1 = -100000000;
  tree[index].sum2 = 100000000;
  if (left == right) {
    int temp = num[left];
    if (number[0][left]) {
      if (index1[temp] + 1 < ve[temp].size()) {
        tree[index].sum1 = ve[temp][index1[temp] + 1].second;
      } else
        tree[index].sum1 = 100000000;
    } else {
      if (index1[temp] - 1 >= 0) {
        tree[index].sum2 = ve[temp][index1[temp] - 1].second;
      } else
        tree[index].sum2 = -100000000;
    }
    index1[temp]++;
    return;
  }
  int mid = left + right >> 1;
  build(left, mid, index << 1);
  build(mid + 1, right, index << 1 | 1);
  tree[index].sum1 = max(tree[index << 1].sum1, tree[index << 1 | 1].sum1);
  tree[index].sum2 = min(tree[index << 1].sum2, tree[index << 1 | 1].sum2);
}
int query(int left, int right, int index, int flag) {
  if (left == tree[index].l && right == tree[index].r) {
    if (!flag)
      return tree[index].sum1;
    else
      return tree[index].sum2;
  }
  int mid = tree[index].l + tree[index].r >> 1;
  if (mid >= right)
    return query(left, right, index << 1, flag);
  else if (left > mid)
    return query(left, right, index << 1 | 1, flag);
  else {
    if (flag == 0)
      return max(query(left, mid, index << 1, flag),
                 query(mid + 1, right, index << 1 | 1, flag));
    else
      return min(query(left, mid, index << 1, flag),
                 query(mid + 1, right, index << 1 | 1, flag));
  }
}
int main() {
  int n, m, i, j;
  char str[100];
  scanf("%d %d", &n, &m);
  memset(number, 0, sizeof(number));
  memset(index1, 0, sizeof(index1));
  memset(vis, 0, sizeof(vis));
  for (i = 1; i <= m; i++) {
    int x;
    scanf("%s %d", str, &x);
    num[i] = x;
    if (str[0] == '+')
      val[i] = 0;
    else
      val[i] = 1;
    if (str[0] == '+')
      ve[x].push_back(make_pair(0, i)), number[0][i]++;
    else
      ve[x].push_back(make_pair(1, i)), number[1][i]++;
  }
  build(1, m, 1);
  for (i = 1; i <= n; i++) {
    if (ve[i].size() == 0) continue;
    pair<int, int> pa = ve[i][ve[i].size() - 1];
    if (pa.second == m) continue;
    if (pa.first == 0) {
      if (query(pa.second + 1, m, 1, 1) < pa.second) vis[i] = 1;
    }
  }
  for (i = 1; i <= n; i++) {
    if (ve[i].size() == 0) continue;
    pair<int, int> pa = ve[i][0];
    if (pa.second == 1) continue;
    if (pa.first == 1) {
      if (query(1, pa.second - 1, 1, 0) > pa.second) vis[i] = 1;
    }
  }
  for (i = 1; i <= n; i++) {
    if (ve[i].size() == 0)
      continue;
    else if (ve[i][ve[i].size() - 1].first == 1)
      ve[i].push_back(make_pair(0, m + 1));
  }
  for (i = 1; i <= n; i++) {
    if (vis[i]) continue;
    if (ve[i].size() == 0) {
      res.push_back(i);
      continue;
    }
    int now = 1;
    for (j = 0; j < ve[i].size(); j++) {
      pair<int, int> pa = ve[i][j];
      if (pa.second - 1 < now) {
        now = pa.second + 1;
        continue;
      } else {
        int temp;
        if (pa.first == 0) {
          break;
        } else {
          if (j == 0) {
            now = pa.second + 1;
            continue;
          }
          int down = query(now, pa.second - 1, 1, 0);
          int up = query(now, pa.second - 1, 1, 1);
          if (down > pa.second || up < now - 1) break;
        }
        now = pa.second + 1;
      }
    }
    if (j >= ve[i].size()) res.push_back(i);
  }
  printf("%d\n", res.size());
  if (!res.size()) return 0;
  sort(res.begin(), res.end());
  for (i = 0; i < res.size(); i++) {
    printf("%d ", res[i]);
  }
  printf("\n");
  return 0;
}
