using System;
using System.Numerics;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Collections;
namespace debug
{
class main
{
static void Main(string args)
{
//問題クラスを展開
ProgramD a = new ProgramD();
a.main();//実行する
}
}
//ABC189
class ProgramA
{
public void main()
{
//入力
string s = Console.ReadLine();
//s[0] == s[1] かつs[1] == s[2]なら勝ち
if (s[0] == s[1] && s[1] == s[2])
Console.WriteLine("Won");
else
Console.WriteLine("Lost");
}
}
class ProgramB
{
public void main()
{
//入
string s = Console.ReadLine().Split();
long n = long.Parse(s[0]);
long x = long.Parse(s[1]) * 100;//あらかじめ100倍しておく
long ans = 0;
//毎回比較
for (int i = 0; i < n; i++)
{
string b = Console.ReadLine().Split();
ans += long.Parse(b[0]) * long.Parse(b[1]);
//もし許容量超えたらi+1杯目が答え
if (ans > x)
{
Console.WriteLine(i + 1);
return;
}
}
//もし許容量超えなかったら-1を出力。
Console.WriteLine(-1);
}
}
class ProgramC
{
public void main()
{
//入力
int n = int.Parse(Console.ReadLine());
string s = Console.ReadLine().Split();
long[] a = new long[n];
for (int i = 0; i < n; i++)
a[i] = long.Parse(s[i]);
long ans = 0;
//Lを固定してRを更新。そのたびに最小を比較しておく
for (int i = 0; i < n; i++)
{
long x = a[i];
for(int j = i;j < n;j++)
{
x = Math.Min(x, a[j]);
ans = Math.Max(ans, x * (j - i + 1));//最小×(R-L+1)で比較
}
}
Console.WriteLine(ans);
}
}
class ProgramD
{
public void main()
{
//入力
int n = int.Parse(Console.ReadLine());
//初項はTrueになるのは一通り
long dp = 1;
//もしORなら2のi+1乗を足す。
for (int i = 0; i < n; i++)
{
string s = Console.ReadLine();
if (s == "OR")
dp = dp + (long)Math.Pow(2, i + 1);
}
//出力
Console.WriteLine(dp);
}
}
}