#include <bits/stdc++.h>
const long long MOD = (long long)1e9 + 7;
using namespace std;
long long power(long long a, long long b) {
  if (b == 0) return 1;
  if (b % 2 == 0) return 1LL * power(a, b / 2) * power(a, b / 2);
  b--;
  return 1LL * power(a, b) * a;
}
int left(int i) { return 2 * i; }
int right(int i) { return 2 * i + 1; }
vector<vector<pair<int, int>>> graph(100001);
struct Node {
 private:
  int x, dist, prev;

 public:
  Node(int a, int b, int c) { x = a, dist = b, prev = c; }
  Node(int a) { x = a, dist = 0, prev = a; }
  Node(int a, int b) { x = a, dist = b; }
  int getDist() { return dist; }
  int getX() { return x; }
  int getPrev() { return prev; }
};
struct cmp {
  bool operator()(Node &a, Node &b) { return a.getDist() < b.getDist(); }
};
void addEdge(int u, int v, int w) {
  graph[u].push_back(make_pair(v, w));
  graph[v].push_back(make_pair(u, w));
}
map<pair<int, int>, vector<pair<int, int>>> gridGraph;
bool vis[21][21];
int cnt = 0;
int n, m;
void dfs(int x, int y) {
  if (x >= 0 && x < n && y >= 0 && y < m) {
    vis[x][y] = true;
    cnt++;
    for (int i = 0; i < gridGraph[make_pair(x, y)].size(); i++) {
      if (!vis[gridGraph[make_pair(x, y)][i].first]
              [gridGraph[make_pair(x, y)][i].second]) {
        dfs(gridGraph[make_pair(x, y)][i].first,
            gridGraph[make_pair(x, y)][i].second);
      }
    }
  }
}
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  int ans = 0;
  if (a) ans = (a - 1) / 2 * 3 + 30;
  if (b) ans = max(ans, (b - 1) / 2 * 3 + 31);
  if (c) ans = max(ans, (c - 1) / 2 * 3 + 32);
  cout << ans << "\n";
}
