#include <bits/stdc++.h>
using namespace std;
int main() {
  int r, g, b;
  int ans, tot, pos, next, tok;
  int data[3] = {2, 3, 5};
  while (scanf("%d %d %d", &r, &g, &b) != EOF) {
    ans = 29;
    next = 0;
    while ((r + g + b) > 0) {
      if (next > 2) next = 0;
      pos = data[next];
      if (pos == 2 && (r - 1 >= 0)) {
        if (r - 2 >= 0)
          r -= 2;
        else
          r--;
        next++;
        ans++;
        continue;
      } else if (pos == 2 && r == 0) {
        ans++;
        next++;
        continue;
      }
      if (pos == 3 && (g - 1 >= 0)) {
        if (g - 2 >= 0)
          g -= 2;
        else
          g--;
        next++;
        ans++;
        continue;
      } else if (pos == 3 && g == 0) {
        ans++;
        next++;
        continue;
      }
      if (pos == 5 && (b - 1 >= 0)) {
        if (b - 2 >= 0)
          b -= 2;
        else
          b--;
        next++;
        ans++;
        continue;
      } else if (pos == 5 && b == 0) {
        ans++;
        next++;
        continue;
      }
    }
    printf("%d\n", ans);
  }
  return 0;
}
