#include <bits/stdc++.h>
int r, g, b, high;
int main() {
  scanf("%d %d %d", &r, &g, &b);
  if (high < 27 + (r + 1) / 2 * 3) high = 27 + (r + 1) / 2 * 3;
  if (high < 28 + (g + 1) / 2 * 3) high = 28 + (g + 1) / 2 * 3;
  if (high < 29 + (b + 1) / 2 * 3) high = 29 + (b + 1) / 2 * 3;
  printf("%d\n", high);
  return 0;
}
