#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[3];
  while (cin >> a[0] >> a[1] >> a[2]) {
    int b[3];
    int i, max = 0;
    for (i = 0; i < 3; i++) {
      b[i] = a[i] % 2;
      a[i] = (a[i] + 1) / 2;
    }
    int pos;
    for (i = 0; i < 3; i++) {
      if (a[i] >= max) {
        max = a[i];
        if (i == 0) pos = 3;
        if (i == 1) pos = 2;
        if (i == 2) pos = 1;
      }
    }
    cout << 30 + 3 * max - pos << endl;
  }
  return 0;
}
