import java.io.*;
import java.util.*;

public class Solution {

    public static void main(String[] args) throws Exception {
        MyReader reader = new MyReader(System.in);
//        MyReader reader = new MyReader(new FileInputStream("input.txt"));
        MyWriter writer = new MyWriter(System.out);
        new Solution().run(reader, writer);
        writer.close();
    }

    private void run(MyReader reader, MyWriter writer) throws IOException, InterruptedException {
        int n = reader.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = reader.nextString().charAt(0);
        }
        long[][] d = new long[n + 1][n + 1];
        d[0][0] = 1;
        long mod = 1_000_000_007;
        for (int i = 1; i < n; i++) {
            for (int j = n - 1; j >= 0; j--) {
                if (a[i - 1] == 'f') {
                    d[i][j + 1] = d[i - 1][j];
                } else {
                    d[i][j] = (d[i - 1][j] + d[i][j + 1]) % mod;
                }
            }
        }
        long ans = 0;
        for (int i = 0; i <= n; i++) {
            ans += d[n - 1][i];
        }
        writer.print(ans % mod);
    }

    static class MyReader {

        final BufferedInputStream in;
        final int bufSize = 1 << 16;
        final byte buf[] = new byte[bufSize];
        int i = bufSize;
        int k = bufSize;
        boolean end = false;
        final StringBuilder str = new StringBuilder();

        MyReader(InputStream in) {
            this.in = new BufferedInputStream(in, bufSize);
        }

        int nextInt() throws IOException {
            return (int) nextLong();
        }

        int[] nextIntArray(int n) throws IOException {
            int[] m = new int[n];
            for (int i = 0; i < n; i++) {
                m[i] = nextInt();
            }
            return m;
        }

        int[][] nextIntMatrix(int n, int m) throws IOException {
            int[][] a = new int[n][0];
            for (int j = 0; j < n; j++) {
               ... What is the time complexity of the previous code?