#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int r, g, b, ans, check = 1;
  cin >> r >> g >> b;
  if (r == 0 && b == 0 && g == 0) {
    cout << 0;
    return 0;
  }
  ans = 30;
  for (int i = 0; i < 1000; i++) {
    if (r == 0 && g == 0 && b == 0) {
      cout << --ans;
      return 0;
    } else if (check == 1) {
      if (r > 2)
        r -= 2;
      else
        r = 0;
      check = 2;
    } else if (check == 2) {
      if (g > 2)
        g -= 2;
      else
        g = 0;
      check = 3;
    } else if (check == 3) {
      if (b > 2)
        b -= 2;
      else
        b = 0;
      check = 1;
    }
    ans++;
  }
}
