#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[3], i, f = 0, t = 0;
  for (i = 0; i < 3; i++) {
    cin >> a[i];
  }
  a[0] -= 2;
  t += 30;
  if ((a[0] < 1) && (a[1] < 1) && (a[2] < 1)) {
    cout << t;
    return 0;
  }
  for (i = 1; f != 1; i = (i + 1) % 3) {
    a[i] -= 2;
    t++;
    if ((a[0] < 1) && (a[1] < 1) && (a[2] < 1)) f = 1;
  }
  cout << t;
  return 0;
}
