#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  vector<int> a(3);
  cin >> a[0] >> a[1] >> a[2];
  int i = 0;
  while (a[i % 3] > 0 || a[(i + 1) % 3] > 0 || a[(i + 2) % 3] > 0) {
    a[i % 3] -= 2;
    i++;
  }
  cout << i + 29;
}
