#include <bits/stdc++.h>
using namespace std;
int main() {
  long long r, g, b;
  cin >> r >> g >> b;
  long long m = 0;
  long long tg = 0, tb = 0, tr = 0;
  long long ans = 0;
  while (r > 0 || g > 0 || b > 0) {
    if (m % 3 == 0 && r > 0) {
      r -= 2;
      tr = 30 + m;
    } else if (m % 3 == 1 && g > 0) {
      g -= 2;
      tg = 30 + m;
    } else if (m % 3 == 2 && b > 0) {
      b -= 2;
      tb = 30 + m;
    }
    m++;
    ans = max(tr, max(tg, tb));
  }
  cout << ans << endl;
  return 0;
}
