#include <iostream>
#include <vector>

using namespace std;

int main(){
  // input
  int L,M,N;
  cin >> L>>M>>N;
  int total = 100*L + 25*M + N;
  int count = 0;
  while(total > 0){
    if(total >=1000){
      total -= 1000;
    }
    else if(total >=100){
      total -= 100;
      count++;
    }
    else if(total >=25){
      total -= 25;
      count++;
    }
    else if(total >=1){
      total -= 1;
      count++;
    }
  }



  cout << count << endl;
  // output 
}