func_code_string: #include <bits/stdc++.h>   using namespace std;   long long p, ans, num;   int n;   string s[500000];   int main() {     cin >> n >> p;     p /= 2;     for (int i = 1; i <= n; ++i) {       cin >> s[i];     }     for (int i = n; i >= 1; --i) {       num *= 2;       if (s[i] ==  halfplus ) num++;       ans += num;     }     cout << ans * p << endl;   }   