#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int r, g, b;
  scanf("%d %d %d", &r, &g, &b);
  int i = 0;
  int maxtime = 0;
  while (!(r == 0 && g == 0 && b == 0)) {
    if (i % 3 == 0 && r > 0) {
      if (r >= 2)
        r -= 2;
      else
        r = 0;
      maxtime = max(maxtime, i + 30);
    } else if (i % 3 == 1 && g > 0) {
      if (g >= 2)
        g -= 2;
      else
        g = 0;
      maxtime = max(maxtime, i + 30);
    } else if (b > 0 && i % 3 == 2) {
      if (b >= 2)
        b -= 2;
      else
        b = 0;
      maxtime = max(maxtime, i + 30);
    }
    i++;
  }
  cout << maxtime << endl;
}
