#include <bits/stdc++.h>
using namespace std;
int main() {
  int time, r, g, b;
  cin >> r >> g >> b;
  time = -1;
  while (r != 0 || g != 0 || b != 0) {
    time++;
    if (r != 0) {
      r = r - 2;
      if (r < 0) r = 0;
    }
    if (r == 0 && g == 0 && b == 0) {
      cout << time + 30 << endl;
      exit(0);
    }
    time++;
    if (g != 0) {
      g = g - 2;
      if (g < 0) g = 0;
    }
    if (r == 0 && g == 0 && b == 0) {
      cout << time + 30 << endl;
      exit(0);
    }
    time++;
    if (b != 0) {
      b = b - 2;
      if (b < 0) b = 0;
    }
    if (r == 0 && g == 0 && b == 0) {
      cout << time + 30 << endl;
      exit(0);
    }
  }
}
