#include <bits/stdc++.h>
using namespace std;
const int maxn = 363310, prime = 1e9 + 7, LAST = 308983067;
long long n, l(-1), r(LAST + 1000);
long long mod(long long a) { return ((a % prime) + prime) % prime; }
long long mul(long long a, long long b) { return mod(a * b); }
long long add(long long a, long long b) { return mod(a + b); }
long long bel1(long long number) {
  if ((number >= l) and (number <= r)) return 1;
  return 0;
}
long long bel2(long long num) {
  if ((num == l) or (num == r)) return 1;
  if ((num > l) and (num < r)) return 2;
  return 0;
}
set<long long> s;
int main() {
  ios::sync_with_stdio(0);
  cin >> n;
  long long curr = 1;
  long long ans = 1;
  string type;
  long long number;
  s.insert(-1);
  s.insert(LAST + 1000);
  for (int i = 1; i <= n; ++i) {
    cin >> type >> number;
    if (type == "ADD") {
      curr = add(curr, bel1(number));
      s.insert(number);
    } else {
      ans = mul(ans, bel2(number));
      curr = 1;
      s.erase(number);
      auto it = s.lower_bound(number);
      r = *it;
      --it;
      l = *(it);
    }
  }
  cout << mul(curr, ans);
  return 0;
}
