#include <bits/stdc++.h>
using namespace std;
int P[3];
signed main() {
  for (int i = 0; i < 3; ++i) {
    cin >> P[i];
  }
  int ans = 0;
  for (int i = 0; P[0] or P[1] or P[2]; i = (i + 1) % 3) {
    P[i] = max(0, P[i] - 2);
    ++ans;
  }
  cout << ans + 29 << endl;
  return 0;
}
