#include<bits/stdc++.h> using namespace std; int main() { char a[5]={'D','C','B','A','D'}; string b; cin>>b; int sum=150; for(int i=0;i<5;i++){ if(b[i]!=a[i]) sum-=30; } cout<<sum; return 0; }