#include <bits/stdc++.h>
using namespace std;
int main() {
  int arr[3] = {0};
  cin >> arr[0] >> arr[1] >> arr[2];
  int time = 0;
  while (arr[0] || arr[1] || arr[2]) {
    int k = time % 3;
    arr[k] -= min(arr[k], 2);
    time++;
  }
  time = time - 1 + 30;
  cout << time << endl;
  return 0;
}
