#include <bits/stdc++.h>
using namespace std;
int main() {
  int r, g, b;
  cin >> r >> g >> b;
  int tmp = max(3 * floor((g + 1) / 2) + 28, 3 * floor((b + 1) / 2) + 29);
  int tmp2 = 3 * floor((r + 1) / 2) + 27;
  int ans = max(tmp2, tmp);
  cout << ans;
}
