#include using namespace std; typedef long long ll; typedef pair pii; #define pb push_back #define mp make_pair #define rep(i,n) for(int i=0;i<(n);++i) int main(){ cin.tie(0); ios::sync_with_stdio(false); int l,m,n;cin >> l >> m >> n; int ans=0; m+=n/25; ans+=n%25; l+=m/4; ans+=m%4; ans+=l%10; cout << ans << endl; }