#include <bits/stdc++.h>
using namespace std;
int main() {
  int r, g, b, time = 29;
  cin >> r >> g >> b;
  int n[3] = {r, g, b};
  while (n[0] + n[1] + n[2]) {
    time++;
    if (n[time % 3] >= 2)
      n[time % 3] -= 2;
    else
      n[time % 3] = 0;
  }
  cout << time << endl;
  return 0;
}
