#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1E9 + 7, INF = 2E18 + 5;
const double PI = 2 * acos(0.0);
const long double EPS = 1.0E-14;
string s[45];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long n, m, ans = 0, apple = 0;
  double val;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] == "halfplus") {
      apple *= 2;
      apple++;
    } else {
      apple *= 2;
    }
  }
  while (apple > 0) {
    val = double(apple) / 2.0;
    ans += (val * m);
    apple /= 2;
  }
  cout << ans;
  return 0;
}
