#include <bits/stdc++.h>
using namespace std;
int main() {
  int r, g, b;
  while (scanf("%d%d%d", &r, &g, &b) != EOF) {
    int res = max(max(3 * ((r + 1) / 2 - 1), 3 * ((g + 1) / 2 - 1) + 1),
                  3 * ((b + 1) / 2 - 1) + 2) +
              30;
    printf("%d\n", res);
  }
  return 0;
}
