#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int r, g, b;
  cin >> r >> g >> b;
  int ans = 0, t = 0;
  while (r + g + b > 0) {
    if (t % 3 == 0) {
      if (r > 0) r = max(r - 2, 0), ans = t + 30;
    } else if (t % 3 == 1) {
      if (g > 0) g = max(g - 2, 0), ans = t + 30;
    } else {
      if (b > 0) b = max(b - 2, 0), ans = t + 30;
    }
    ++t;
  }
  cout << ans << '\n';
}
