#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  a = (a - 1) / 2 * 3;
  if (b == 0) {
    b = 0;
  } else {
    b = (b - 1) / 2 * 3 + 1;
  }
  if (c == 0) {
    c = 0;
  } else {
    c = (c - 1) / 2 * 3 + 2;
  }
  int max = a;
  if (b > max) max = b;
  if (c > max) max = c;
  cout << max + 30 << endl;
}
