#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  int ans = max((a + 1) / 2, max((b + 1) / 2, (c + 1) / 2));
  int A = (a + 1) / 2;
  int B = (b + 1) / 2;
  int C = (c + 1) / 2;
  ans = 27;
  if (C >= B && C >= A) {
    ans += 3 * C + 2;
    cout << ans << endl;
    return 0;
  }
  if (B > C && B >= A) {
    ans += 3 * B + 1;
    cout << ans << endl;
    return 0;
  }
  if (A > C && A > B) {
    ans += 3 * A;
    cout << ans << endl;
    return 0;
  }
  return 0;
}
