#include<bits/stdc++.h> using namespace std; int main() { long long a,b,c; cin>>a>>b>>c; cout<<a/10*2+b/10*3+c/10*5; return 0; }