#include <bits/stdc++.h>
using namespace std;
int r, g, b, res, i, loop;
int main() {
  cin >> r >> g >> b;
  i = 0;
  loop = 1;
  while (r != 0 || g != 0 || b != 0) {
    if (loop == 1) {
      if (r > 0) {
        if (r > 2)
          r = r - 2;
        else
          r = 0;
        if (i + 30 > res) res = i + 30;
      }
      loop = 2;
      i++;
      continue;
    } else if (loop == 2) {
      if (g > 0) {
        if (g > 2)
          g = g - 2;
        else
          g = 0;
        if (i + 30 > res) res = i + 30;
      }
      loop = 3;
      i++;
      continue;
    } else {
      if (b > 0) {
        if (b > 2)
          b = b - 2;
        else
          b = 0;
        if (i + 30 > res) res = i + 30;
      }
      loop = 1;
      i++;
      continue;
    }
  }
  cout << res;
  return 0;
}
