#include <bits/stdc++.h>
int main() {
  int r, g, b, s, a;
  scanf("%d %d %d", &r, &g, &b);
  a = 2;
  for (s = 29; r != 0 || g != 0 || b != 0; s++) {
    if (a == 2) {
      r = r - 2;
      if (r < 0) {
        r = 0;
      }
      a = 0;
      continue;
    }
    if (a == 0) {
      g = g - 2;
      if (g < 0) {
        g = 0;
      }
      a = 1;
      continue;
    }
    if (a == 1) {
      b = b - 2;
      if (b < 0) {
        b = 0;
      }
      a = 2;
      continue;
    }
  }
  printf("%d\n", s);
}
