#include <bits/stdc++.h>
using namespace std;
int check(int r, int g, int b) {
  if (r == 0 && g == 0 && b == 0) return -1;
  return 1;
}
int main() {
  int r, g, b, time = 29;
  ;
  scanf("%d%d%d", &r, &g, &b);
  while (r != 0 || g != 0 || b != 0) {
    if (r > 1)
      r -= 2;
    else if (r == 1)
      r--;
    time++;
    if (check(r, g, b) < 0) break;
    if (g > 1)
      g -= 2;
    else if (g == 1)
      g--;
    time++;
    if (check(r, g, b) < 0) break;
    if (b > 1)
      b -= 2;
    else if (b == 1)
      b--;
    time++;
    if (check(r, g, b) < 0) break;
  }
  printf("%d", time);
  return 0;
}
