#include<iostream> using namespace std; int main() { int t,h,e; cin>>t>>h>>e; int w=t/10*2+h/10*3+e/10*5; cout<<w; return 0; }