#include <bits/stdc++.h>
using namespace std;
int main() {
  int r, g, b, rc, gc, bc, carno = 0;
  cin >> r >> g >> b;
  rc = r / 2 + r % 2;
  gc = g / 2 + g % 2;
  bc = b / 2 + b % 2;
  if (bc >= rc && bc >= gc)
    carno = bc * 3;
  else if (gc >= rc && gc > bc)
    carno = gc * 3 - 1;
  else if (rc > gc && rc > bc)
    carno = rc * 3 - 2;
  cout << 29 + carno;
  return 0;
}
