#include <bits/stdc++.h>
using namespace std;
int main() {
  int rgb, reqd_rgb[3], mx = 0;
  for (int i = 0; i < 3; i++) {
    scanf("%d", &rgb);
    if (rgb) {
      if (rgb & 1 ^ 1)
        reqd_rgb[i] = rgb / 2;
      else
        reqd_rgb[i] = (rgb / 2) + 1;
      mx = max(mx, 30 + i + ((reqd_rgb[i] - 1) * 3));
    }
  }
  printf("%d", mx);
  return 0;
}
