#include #include #include using namespace std; #define RREP(i,s,e) for (i = e-1; i >= s; i--) #define rrep(i,n) RREP(i,0,n) #define REP(i,s,e) for (i = s; i < e; i++) #define rep(i,n) REP(i,0,n) #define INF 1e8 typedef long long ll; int main() { ll i, maxl, ans, l; ll c[256]; REP (i,'a','z'+1) cin >> c[i]; l = c['l']; l = round(((double)l+1+sqrt(l*l-l+1))/3); ans = c['h']*c['e']*l*(l-1)/2*(c['l']-l)*(c['o']/2)*((c['o']+1)/2)*c['w']*c['r']*c['d']; cout << ans << endl; return 0; }