#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  int r, g, b;
  cin >> r >> g >> b;
  int t = 0;
  for (; r || g || b; ++t) switch (t % 3) {
      case 0:
        r -= min(r, 2);
        break;
      case 1:
        g -= min(g, 2);
        break;
      default:
        b -= min(b, 2);
    }
  cout << t + 29;
  return 0;
}
