#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[3];
  cin >> a[0];
  cin >> a[1];
  cin >> a[2];
  int q = 0;
  int t = 0;
  while (a[0] + a[1] + a[2] != 0) {
    if (a[q] > 0) {
      if (a[q] == 1) {
        a[q]--;
      } else {
        a[q] -= 2;
      }
    }
    t++;
    q = (q + 1) % 3;
  }
  cout << t + 29;
}
