import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;


public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        TaskC.InputReader in = new TaskC.InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.Solve(in, out);
        out.close();
    }


    static class TaskC {

        private long mod = 1_000_000_007;
        private int n;
        private boolean[] s;

        public void Solve(InputReader in, PrintWriter out) {
            n = in.NextInt();
            s = new boolean[n];
            for (int i = 0; i < n; i++) {
                String ss = in.Next();
                s[i] = ss.charAt(0) == 'f';
            }
            if (s[n - 1]) {
                out.println(0);
                return;
            }
            long[] dpSum = new long[n + 1], lastDpSum = new long[n + 1];
            for (int i = 0; i <= n; i++) {
                lastDpSum[i] = i + 1;
            }
            for (int i = n - 2; i >= 0; i--) {
                for (int j = 0; j <= i; j++) {
                    if (!s[i]) {
                        dpSum[j] = lastDpSum[j];
                    } else {
                        dpSum[j] = lastDpSum[j + 1] - lastDpSum[j];
                    }
                    if (j != 0) {
                        dpSum[j] += dpSum[j - 1];
                    }
                    dpSum[j] %= mod;
                    while (dpSum[j] < 0) dpSum[j] += mod;

                }
                long[] temp = dpSum;
                dpSum = lastDpSum;
                lastDpSum = temp;
            }
            out.println(lastDpSum[0]);
        }

        public static int GetMax(int[] ar) {
            int max = Integer.MIN_VALUE;
            for (int a : ar) {
               ... Which one is the correct time complexity of the code snippet: constant, linear, quadratic, cubic, log(n), nlog(n) or NP-hard?