#include <bits/stdc++.h>
using namespace std;
template <class A, class B>
ostream& operator<<(ostream& out, const pair<A, B>& a) {
  return out << "(" << a.first << ", " << a.second << ")";
}
template <class A>
ostream& operator<<(ostream& out, const vector<A>& a) {
  out << "[";
  for (auto it = a.begin(); it != a.end(); ++it) {
    if (it != a.begin()) out << ", ";
    out << *it;
  }
  return out << "]";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, i, j, x, t, y, p;
  string s;
  cin >> n;
  set<long long> st;
  long long buy = -1e18, sell = 1e18, tot = 0, ans = 1;
  for (i = 0; i < n; i++) {
    cin >> s >> p;
    if (s == "ADD") {
      if (p > buy && p < sell) tot++;
      st.insert(p);
    } else {
      if (p > buy && p < sell) ans = (ans * 2) % 1000000007;
      if (p < buy || p > sell) {
        cout << 0;
        return 0;
      }
      auto it = st.upper_bound(p);
      if (it == st.end())
        sell = 1e18;
      else
        sell = *it;
      it = st.lower_bound(p);
      if (it == st.begin())
        buy = -1e18;
      else
        buy = *(--it);
      st.erase(p);
      tot = 0;
    }
  }
  ans = ans * (tot + 1) % 1000000007;
  cout << ans;
}
