#include int main(){ int a=1,b; while(b=getchar()-10)a=a*2+(b==72); printf("%d",a); return 0; }