#include <bits/stdc++.h>
using namespace std;
int arr[(int)5e5 + 10];
int main() {
  int r, g, b;
  cin >> r >> g >> b;
  int javab = 0;
  for (int i = 0; r > 0; i += 3) {
    r -= 2;
    javab = max(javab, i + 30);
  }
  for (int i = 1; g > 0; i += 3) {
    g -= 2;
    javab = max(javab, i + 30);
  }
  for (int i = 2; b > 0; i += 3) {
    b -= 2;
    javab = max(javab, i + 30);
  }
  cout << javab;
}
