#include <bits/stdc++.h>
int main() {
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);
  int x = 30;
  while (a > 0 || b > 0 || c > 0) {
    switch (x % 3) {
      case 0:
        a -= 2;
        if (a < 0) a = 0;
        break;
      case 1:
        b -= 2;
        if (b < 0) b = 0;
        break;
      case 2:
        c -= 2;
        if (c < 0) c = 0;
        break;
    }
    x++;
  }
  printf("%d\n", x - 1);
}
