#include <bits/stdc++.h>
using namespace std;
bool T = false;
int i, j, r, b, g;
int main() {
  cin >> r >> g >> b;
  i = 0;
  while (T == false) {
    i++;
    j = i % 3;
    switch (j) {
      case 1:
        if (r > 0) r = r - 2;
        break;
      case 2:
        if (g > 0) g = g - 2;
        break;
      default:
        if (b > 0) b = b - 2;
        break;
        break;
    }
    if (r <= 0 & g <= 0 & b <= 0) T = true;
  }
  cout << i + 29;
}
