#include <bits/stdc++.h>
using namespace std;
long long int const mod = 1e9 + 7;
long long int INF = 1000000000;
const long long int N = 1e6 + 3;
const long long int M = 1e5 + 5;
bool sortcol(const vector<long long int>& v1, const vector<long long int>& v2) {
  if (v1[1] == v2[1]) return v1[0] < v2[0];
  return v1[1] < v2[1];
}
bool comp(pair<long long int, long long int> p1,
          pair<long long int, long long int> p2) {
  if (p1.second == p2.second) {
    return p1.first < p2.first;
  }
  return p1.second < p2.second;
}
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long int findGCD(long long int arr[], long long int n) {
  long long int result = arr[0];
  for (long long int i = 1; i < n; i++) {
    result = gcd(arr[i], result);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
long long int lcm(long long int a, long long int b) {
  return (a * b) / gcd(a, b);
}
bool bit_setc(long long int n, long long int x) {
  if (n & (1LL << x)) return true;
  return false;
}
long long int bit_set(long long int n, long long int x) {
  return n = n | (1LL << x);
}
long long int bit_tog(long long int n, long long int x) {
  return n = n ^ (1LL << x);
}
long long int power(long long int a, long long int b) {
  if (b == 0) return 1;
  if (b == 1) return a;
  if (b % 2 == 0) {
    return power(a, b / 2) * power(a, b / 2);
  } else
    return power(a, b / 2) * power(a, b / 2) * a;
}
long long int power_bit(long long int a, long long int b, long long int m) {
  long long int ans = 1;
  while (b > 0) {
    if (b % 2) {
      ans = (ans * a) % m;
    }
    a = (a * a) % m;
    b = b / 2;
  }
  return ans;
}
long long int multiply_bit(long long int a, long long int b, long long int m) {
  long long int ans = 1;
  while (b > 0) {
    if (b % 2) {
      ans = (ans + a) % m;
    }
    a = (a + a) % m;
    b = b / 2;
  }
  return ans - 1;
}
long long int x[] = {-1, 0, 1, 0};
long long int y[] = {0, -1, 0, 1};
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(10);
  long long int t = 1;
  while (t--) {
    long long int n;
    cin >> n;
    string s[n];
    for (long long int i = 0; i < n; i++) cin >> s[i];
    long long int dp[n][n];
    memset(dp, 0, sizeof(dp));
    dp[0][0] = 1;
    for (long long int i = 1; i < n; i++) {
      if (s[i - 1] == "f") {
        for (long long int j = 0; j < i; j++) {
          dp[i][j + 1] = dp[i - 1][j];
        }
      } else {
        long long int suf = 0;
        for (long long int j = i - 1; j >= 0; j--) {
          suf = (suf % mod + dp[i - 1][j] % mod) % mod;
          dp[i][j] = suf % mod;
        }
      }
    }
    long long int ans = 0;
    for (long long int i = 0; i < n; i++)
      ans = (ans % mod + dp[n - 1][i] % mod) % mod;
    cout << ans;
  }
  return 0;
}
