#include <bits/stdc++.h>   using namespace std;   int main() {     string q[41];     long long n, p, i, count = 1, check = 1;     cin >> n >> p;     for (i = 0; i < n; i++) cin >> q[i];     for (i = n - 2; i >= 0; i--) {       if (q[i] ==  halfplus ) {         count = count * 2 + 1;         check++;       } else         count = count * 2;     }     cout << p * count - (p / 2) * check << endl;     return 0;   }   