#include <bits/stdc++.h>
using namespace std;
const int md = 1e9 + 7;
inline void add(int &x, int y) {
  x += y;
  if (x >= md) x -= md;
}
int n;
int dp[400010][2];
pair<int, int> orders[400010];
int val[400010];
int l[400010], r[400010];
multiset<int> st;
char buf[10];
int cnt;
vector<int> tot;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%s", buf);
    int p;
    scanf("%d", &p);
    if (buf[1] == 'D')
      orders[i] = make_pair(0, p), st.insert(p);
    else
      orders[i] = make_pair(1, p), val[++cnt] = p, st.erase(st.find(p));
  }
  for (multiset<int>::iterator it = st.begin(); it != st.end(); it++)
    tot.push_back(*it);
  sort(tot.begin(), tot.end());
  tot.erase(unique(tot.begin(), tot.end()), tot.end());
  if (!cnt) {
    printf("%d", (int)tot.size() + 1);
    return 0;
  }
  int k = cnt;
  for (int i = n; i >= 1; i--) {
    if (orders[i].first == 1) {
      multiset<int>::iterator it = st.lower_bound(val[k] + 1);
      if (it == st.end())
        r[k] = 1e9;
      else
        r[k] = *it;
      it = st.lower_bound(val[k]);
      if (it == st.begin())
        l[k] = 0;
      else
        it--, l[k] = *it, it++;
      if (k == cnt) {
        it = st.lower_bound(val[k] + 1);
        int tl = 0, tr = 1e9;
        if (it != st.end()) tr = *it;
        if (it != st.begin()) it--, tl = *it, it++;
        for (int j = -1; j < (int)tot.size(); j++) {
          if (j == -1 && tl) continue;
          if (j + 1 == (int)tot.size() && tr < 1e9) continue;
          if ((j == -1 || tot[j] >= tl) &&
              (j + 1 == (int)tot.size() || tot[j + 1] <= tr))
            dp[k][0]++;
        }
        it = st.lower_bound(val[k]);
        tl = 0;
        tr = 1e9;
        if (it != st.end()) tr = *it;
        if (it != st.begin()) it--, tl = *it, it++;
        for (int j = -1; j < (int)tot.size(); j++) {
          if (j == -1 && tl) continue;
          if (j + 1 == (int)tot.size() && tr < 1e9) continue;
          if ((j == -1 || tot[j] >= tl) &&
              (j + 1 == (int)tot.size() || tot[j + 1] <= tr))
            dp[k][1]++;
        }
      } else {
        it = st.lower_bound(val[k] + 1);
        int tl = 0, tr = 1e9;
        if (it != st.end()) tr = *it;
        if (it != st.begin()) it--, tl = *it, it++;
        if (val[k + 1] >= tl && r[k + 1] <= tr) add(dp[k][0], dp[k + 1][0]);
        if (l[k + 1] >= tl && val[k + 1] <= tr) add(dp[k][0], dp[k + 1][1]);
        it = st.lower_bound(val[k]);
        tl = 0;
        tr = 1e9;
        if (it != st.end()) tr = *it;
        if (it != st.begin()) it--, tl = *it, it++;
        if (val[k + 1] >= tl && r[k + 1] <= tr) add(dp[k][1], dp[k + 1][0]);
        if (l[k + 1] >= tl && val[k + 1] <= tr) add(dp[k][1], dp[k + 1][1]);
      }
      k--;
      st.insert(orders[i].second);
    } else
      st.erase(st.find(orders[i].second));
  }
  printf("%d", (dp[1][0] + dp[1][1]) % md);
  return 0;
}
