
#include <algorithm>
#include <cstdint>
#include <iostream>
#include <iterator>
#include <sstream>
#include <string>
#include <vector>
std::vector<float> read_input() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);

  std::string line = std::string{};
  std::getline(std::cin, line);

  std::istringstream iss = std::istringstream{line};

  return std::vector<float>{std::istream_iterator<float>{iss},
                            std::istream_iterator<float>{}};
}

int main(int argc, char *argv[]) {
  std::vector<float> input = read_input();

  input.erase(std::remove_if(input.begin(), input.end(),
                             [](uint32_t x) { return x == 0; }),
              input.end());
  switch (input.size()) {
  case 0:
    std::printf("%.2f", (float)24);
    break;
  case 2:
    std::printf("%.2f", input.at(0) + input.at(1) +
                            (416 - input.at(0) - input.at(1)) / 50);
    break;
  case 1:
    std::printf("%.2f", input.at(0) + 2 * ((416 - input.at(0)) / (51)));
    break;
  case 3:
    std::printf("%.2f", input.at(0) + input.at(1) + input.at(2));
    break;
  }
}
