#include <bits/stdc++.h>
using namespace std;
int co[5];
int main() {
  int now = 0;
  int t = 0;
  int r, g, b;
  cin >> co[1] >> co[2] >> co[3];
  while (co[1] > 0 || co[2] > 0 || co[3] > 0) {
    now++;
    if (now == 4) now = 1;
    co[now] -= 2;
    t++;
  }
  cout << t + 30 - 1;
  return 0;
}
