A group of university students wants to get to the top of a mountain to have a picnic there. For that they decided to use a cableway.A cableway is represented by some cablecars, hanged onto some cable stations by a cable. A cable is scrolled cyclically between the first and the last cable stations (the first of them is located at the bottom of the mountain and the last one is located at the top). As the cable moves, the cablecar attached to it move as well.The number of cablecars is divisible by three and they are painted three colors: red, green and blue, in such manner that after each red cablecar goes a green one, after each green cablecar goes a blue one and after each blue cablecar goes a red one. Each cablecar can transport no more than two people, the cablecars arrive with the periodicity of one minute (i. e. every minute) and it takes exactly 30 minutes for a cablecar to get to the top.All students are divided into three groups: r of them like to ascend only in the red cablecars, g of them prefer only the green ones and b of them prefer only the blue ones. A student never gets on a cablecar painted a color that he doesn't like,The first cablecar to arrive (at the moment of time 0) is painted red. Determine the least time it will take all students to ascend to the mountain top.

The first line contains three integers r, g and b (0 ≤ r, g, b ≤ 100). It is guaranteed that r + g + b > 0, it means that the group consists of at least one student.

Print a single number — the minimal time the students need for the whole group to ascend to the top of the mountain.

NoteLet's analyze the first sample.At the moment of time 0 a red cablecar comes and one student from the r group get on it and ascends to the top at the moment of time 30.At the moment of time 1 a green cablecar arrives and two students from the g group get on it; they get to the top at the moment of time 31.At the moment of time 2 comes the blue cablecar and two students from the b group get on it. They ascend to the top at the moment of time 32.At the moment of time 3 a red cablecar arrives but the only student who is left doesn't like red and the cablecar leaves empty.At the moment of time 4 a green cablecar arrives and one student from the g group gets on it. He ascends to top at the moment of time 34.Thus, all the students are on the top, overall the ascension took exactly 34 minutes.

                                       /* in the name of Allah */

#include <algorithm>
#include <iostream>
#include <memory.h>
#include <iomanip>
#include <sstream>
#include <fstream>
#include <cstdio>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
#include <list>
#include <map>
#include <set>

using namespace std;

ifstream fin("input.txt");
ofstream fout("output.txt");

#define uint unsigned int
#define int64 long long
#define P pair<int, int>
#define Pss pair<string, string>
#define PLL pair<int64, int64>
#define Inf 1000000
#define Mod 1000000007LL
//#define cin fin
//#define cout fout

int n, k;
string str;
bool mark[2010][110];
int cnt[2010][30];

int main(){
	int r, g, b;
	cin >> r >> g >> b;
	int tr = (r == 0 ? 0 : (r - 1) / 2 * 3 + 30);
	int tg = (g == 0 ? 0 : (g - 1) / 2 * 3 + 31);
	int tb = (b == 0 ? 0 : (b - 1) / 2 * 3 + 32);
	cout << max(tr, max(tb, tg)) << endl;
    return 0;
}

#include<iostream>
using namespace std;
int a[4],t,z,x,ans;
int main(){
    cin>>a[1]>>a[2]>>a[3];
    z=a[1]+a[2]+a[3];//z为总人数
    for(int j=1;j<=9999;j++){
        for(int i=1;i<=3;i++){
            x=i;
            if(a[i]>=2){
                a[i]-=2;
                z-=2;
                ans++;
            }else{
                z-=a[i];
                a[i]=0;
                ans++;
            }if(z==0)break;//z归零break
        }
        if(z==0)break;//z归零break
    }cout<<ans+29<<endl;//因为是0起 所以加29
    return 0;//精彩！！
}

#include<iostream>
#include<string>
#include<cmath>
#include<cctype>
#include<vector>
#include<sstream>
#include<algorithm>
#include<set>
#include<map>
#include<fstream>
#define pb push_back
using namespace std;
int main(){
	int r,g,b;
	cin>>r>>g>>b;
	if(r%2==0){
		r/=2;
	}
	else{
		r=r/2+1;
	}
	if(g%2==0){
		g/=2;
	}
	else{
		g=g/2+1;
	}
	if(b%2==0){
		b/=2;
	}
	else{
		b=b/2+1;
	}
	int s=max(max(r,b),g);
	if(s==b){
		cout<<30+(b-1)*3+2;
	}
	else{
		if(s==g){
			cout<<30+(g-1)*3+1;
		}
		else{
			cout<<30+(r-1)*3;
		}
	}

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int r,g,b,car=3;
  cin>>r>>g>>b;
  int ans=29;
  while(r>0||g>0||b>0)
  {

      if(car%3==0)
      {
          r-=2;
      }
      if(car%3==1)
      {
          g-=2;
      }
      if(car%3==2)
      {
          b-=2;
      }
      car++;
      ans++;

  }
  cout<<ans;
}

#include <bits/stdc++.h>
using namespace std;
#define For(i,a,b) for(int i=a;i<b;i++)
#define mp make_pair
#define pb push_back
#define mod 1000000007
#define eps 0.00000001
#define maxn 1000000

int r,g,b;

int main( ){
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    //ios::sync_with_stdio(0);
    cin>>r>>g>>b;
    r=(r+1)/2;
    g=(g+1)/2;
    b=(b+1)/2;
    cout<<30+max(3*(r-1),max(1+3*(g-1),2+3*(b-1)));
}

#include "bits/stdc++.h"

using namespace std;

typedef long long ll;

int main(){

    std::ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
#ifdef DEBUG
    freopen("/Users/rzmn/acm/acm/input.txt", "r", stdin);
#endif

    int r, g, b;
    while (cin >> r >> g >> b)
    {
        int ans = 29;
        for (int i = 0; max({r, g, b}) > 0; ++i)
        {
            if (i % 3 == 0)
            {
                r -= 2;
            }
            if (i % 3 == 1)
            {
                g -= 2;
            }
            if (i % 3 == 2)
            {
                b -= 2;
            }
            ++ans;
        }
        cout << ans << '\n';
    }

}
/* Mon Feb 27 2017 18:48:25 GMT+0300 (RTZ 2 (зима)) */

/* Mon Feb 27 2017 18:55:36 GMT+0300 (RTZ 2 (зима)) */

#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <string>
#include <set>
#include <map>

using namespace std;

const int N = 500010;

int i, j, n, m, k, a[N];

int main()
{
    ios_base::sync_with_stdio(0);
    int r, g, b;
    cin >> r >> g >> b;
    int i = 0, last = -50;
    while (r > 0 || g > 0 || b > 0)
    {
        if (i % 3 == 0)
            r -= 2;
        else if (i % 3 == 1)
            g -= 2;
        else
            b -= 2;
        i ++;
    }
    cout << i + 29;
    return 0;
}
/*
*/

/** coder Mohammad Al-Hussein *_^ */
#include <bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define mp make_pair
#define All(v) v.begin(),v.end()
#define mod  1000000007
#define write freopen("out.out","w",stdout)
#define FIO std::ios_base::sync_with_stdio(false);
using namespace std;
int a[1005];
vector <int> c,b;
int main()
{
    int r,g,b;
    cin >> r >> g >> b;

    int r1 = (r/2+r%2 - 1)*3 + 30;
    int r2 = (g/2+g%2 - 1)*3 + 31;
    int r3 = (b/2+b%2 - 1)*3 + 32;

    cout << max(r1,max(r2,r3));

    return 0;
}

#include <cassert>
#include <complex>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <limits>
#include <numeric>
#include <sstream>
#include <utility>

#include <algorithm>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

#include <memory.h>
//#include "bigint.h"

using namespace std;

#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define init(st) memset(st, 0, sizeof(st))
#define ll long long

// String operations
template<class T>
void splitstr(const string &s, vector<T> &out) {
    istringstream in(s);
    out.clear();
    copy(istream_iterator<T>(in), istream_iterator<T>(), back_inserter(out));
}

template<class T>
T read_value(string s) {
    T result;
    istringstream sin(s);
    sin >> result;
    return result;
}

#define read_int(s) read_value<int>(s)
#define read_ll(s) read_value<ll>(s)
#define read_float(s) read_value<float>(s)
#define read_double(s) read_value<double>(s)

string read_line() {
    string ret_val;
    getline(std::cin, ret_val);
    return ret_val;
}

template<class T>
void init_array(T *arr, int size, T value) {
    for (int i = 0; i < size; i++)
        arr[i] = value;
}

// Arithmetic operations
template<class T>
inline T gcd(T a, T b) {
    return (!a) ? b : gcd(b % a, a);
}

template<class T>
inline T mod(T a, T p) {
    a %= p;
    return (a < 0) ? a + p : a;
}

template<class T>
inline int num_bits(T n) {
    return (!n) ? 0 : 1 + numbits(n & (n - 1));
}

template<class T>
inline T inverse(T a, T m) {
    a = mod<T>(a,m);
    return (a==1) ? 1 : mod((1-m*inverse(m%a,a))/a,m);
}

template<class T>
inline bool is_prime(T a) {
    T lim = (T)sqrt((double)a);
    for (T i = 2; i <= T(lim+1E-9); i++)
        if (a % i == 0)
           return false;
    return true;
}

template<class T>
inline T power(T a, T p, T mod) {
    if (!p) return 1;
    T temp = power(a, p>>1, mod);
    temp = (temp * temp) % mod;
    if (p&1)
        temp = (temp * a) % mod;
    return temp;
}

void get_primes(int start, int end, vector<int> &vi) {
    int *p = new int[end + 1];
    init_array<int>(p, end+1, 0); p[1] = 1;
    for (int i = 2; i <= end; i++) {
            if (!p[i]) {
                    if (i >= start)
                            vi.push_back(i);
                    for (int j = 2*i; j <= end; j += i)
                            p[j] = 1;
            }
    }
    delete [] p;
}

// Graph operations
bool dfs(int current, int final, int total, int* visited, int **edges, bool flow) {
    if (current == final)
            return true;
    if (visited[current])
            return false;
    visited[current] = true;
    for (int i = 0; i < total; i++)
            if (edges[current][i] && dfs(i, final, total, visited, edges, flow)) {
                    if (flow) {
                            edges[current][i]--;
                            edges[i][current]++;
                    }
                    return true;
            }
    return false;
}

int flow(int in, int out, int total, int **edges) {
    int result = 0;
    int *visited = new int[total];
    while (init_array<int>(visited, total, 0), dfs(in, out, total, visited, edges, true))
            result++;
    delete [] visited;
    return result;
}

// Disjoint datasets
void create_set(int x, int *P, int *rank) {
        P[x] = x;
        rank[x] = 0;
}

int find_set(int x, int *P) {
        if (x != P[x])
                P[x] = find_set(P[x], P);
        return P[x];
}

bool merge_sets(int x, int y, int *P, int *rank) {
        int Px = find_set(x, P);
        int Py = find_set(y, P);
        if(Px == Py)
                return false;
        if (rank[Px] > rank[Py]) P[Py] = Px;
        else P[Px] = Py;
        if (rank[Px] == rank[Py])
                rank[Py]++;
        return true;
}

// Binary tree operations
template <typename T>
int read_cum_freq(int index, T *tree) {
        int sum = 0;
        while (index) {
                sum += tree[index];
                index -= (index & -index);
        }
        return sum;
}

template <typename T>
void upd_freq(int index, int mxIndex, int value, T *tree) {
        while (index <= mxIndex) {
                tree[index] += value;
                index += (index & -index);
        }
}

template <typename T>
int read_freq(int index, T *tree) {
        return read_cum_freq(index, tree) - read_cum_freq(index-1, tree);
}

// String algos.
void build_failure_function(const string &str, int *temp_arr) {
    temp_arr[0] = temp_arr[1] = 0;
    for (int i = 2; i <= sz(str); i++) {
        temp_arr[i] = -1;
        for (int ind = temp_arr[i-1]; temp_arr[i] == -1; ind = temp_arr[ind]) {
            if (str[ind] == str[i-1]) {
                temp_arr[i] = ind + 1;
            } else if (ind == 0) {
                temp_arr[i] = 0;
            }
        }
    }
}

void KMP(const string &text, const string &pattern, int *res) {
    int *temp_arr = new int[sz(pattern) + 1];
    build_failure_function(pattern, temp_arr);
    int i = 0;
    int ind = 0;
    while (i < sz(text)) {
        if (text[i] == pattern[ind]) {
            res[i] = ++ind;
            if (res[i] == sz(pattern)) {
                ind = temp_arr[ind];
            }
            i++;
        } else if (ind == 0) {
            res[i++] = 0;
        } else {
            ind = temp_arr[ind];
        }
    }
    delete [] temp_arr;
}

// Setup
void setup(int value, string name) {
    string name_in = name + ".in";
    string name_out = name + ".out";
    freopen(name_in.c_str(), "r", stdin);
    if (value) {
        freopen(name_out.c_str(), "w", stdout);
    }
}

int main() {
#ifdef LOCAL_HOST
    setup(0, "temp");
#endif
    int r, g, b; std::cin >> r >> g >> b;
    int t1 = (r - 1) / 2 * 3;
    int t2 = (g - 1) / 2 * 3 + (g?1:0);
    int t3 = (b - 1) / 2 * 3 + (b?2:0);
    std::cout << max(max(t1, t2), t3) + 30 << std::endl;
    return 0;
}

#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
    int r,g,b;
    cin>>r;
    cin>>g;
    cin>>b;

    int redcar=0;
    int greencar=0;
    int bluecar=0;
    int timered;
    int timegreen;
    int timeblue;
    int time;

    while (r>0)
    {
        r=r-2;
        redcar=redcar+1;
    }
    timered=30+(redcar-1)*3;

    while (g>0)
    {
        g=g-2;
        greencar=greencar+1;
    }
    timegreen=31+(greencar-1)*3;

    while (b>0)
    {
        b=b-2;
        bluecar=bluecar+1;
    }
    timeblue=32+(bluecar-1)*3;

cout<<max(timered,max(timeblue,timegreen));
}

#include<bits/stdc++.h>
#include<algorithm>
using namespace std;
int main()
{
	long long a,b,c,kq;
	cin>>a>>b>>c;
	kq=30;
	while (1)
	{
		a=a-2;
		if(a<=0&&b<=0&&c<=0)
		{
			break;
		}
		kq++;
		b=b-2;
		if(a<=0&&b<=0&&c<=0)
		{
			break;
		}
		kq++;
		c=c-2;
		if(a<=0&&b<=0&&c<=0)
		{
			break;
		}
		kq++;
	}
	cout<<kq;
}

#include <iostream>

using namespace std;

int main() {
    int tempo = 29, r, g, b, car = -1;

    cin >> r >> g >> b;

    while(r || g || b) {
        if(car == 2) {
            car = -1;
        }
        ++car;
        switch(car) {
            case 1://carro verde
                if(g > 1) {
                    g -= 2;
                }
                else {
                    g = 0;
                }
                break;
            case 2: // azul
                if(b > 1) {
                    b -= 2;
                }
                else {
                    b = 0;
                }
                break;
            default: // carro vermelho
                if(r > 1) {
                    r -= 2;
                }
                else {
                    r = 0;
                }
                break;
        }
        ++tempo;
    }

    cout << tempo << endl;
    return 0;
}
// 1515006687717

#include<iostream>
#include<cmath>
using namespace std;
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int r,g,b;
    cin>>r>>g>>b;
    r = ceil((r*1.0)/2.0);
    g = ceil((g*1.0)/2.0);
    b = ceil((b*1.0)/2.0);
    r = 0 + 3*(r-1);
    g = 1 + 3*(g-1);
    b = 2 + 3*(b-1);
    cout<<30+max(r,max(g,b))<<"\n";
    return 0;
}

#include <bits/stdc++.h>

typedef long long ll;
using namespace std;
const int INF = 1e9;
long long mod = 1000000000+7;
vector<vector<int> >g;
   //         int n,m;

    vector<vector<int> > grid(501,vector<int>(501,INF));
    vector<vector<int> > x(501,vector<int>(501,-1));
  long long  pow(long long  a, long long  b, long long m)
 {
        stack<int>k;
        int j = 128;
        int l = 1;
       int an = 1;
        while(b){
            if(b>=j){
                k.push(j);
                b-=j;
            }
            j/=2;
        }
        while(!k.empty()){
            if(k.top()==l){
                an = (an*a)%mod;
                k.pop();
            }
            a = (a*a)%mod;
            l*=2;
        }

        return an;
 }

 int main(){
   ios_base::sync_with_stdio(0);cin.tie(NULL);
   // freopen("zeros.in","r",stdin);
    //freopen("pizza.out","w",stdout);
            int a,b,c;
            cin>>a>>b>>c;
            c++;
            c/=2;
            b++;b/=2;
            a++;a/=2;

           if(c>=a&&c>=b) {

                cout<<((c-1)*3)+32<<endl;
            }
            else if(b>=a&&b>=c){

                cout<<((b-1)*3)+31<<endl;
            }
            else{

                cout<<((a-1)*3)+30<<endl;
            }
                return 0;
}

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<vector>

#define MAX(A,B) (A>B)?A:B

int main()
{
    int r,g,b;

    scanf("%ld %ld %ld",&r,&g,&b);

    r=r/2+r%2;
    r=(r-1)*3;
    g=g/2+g%2;
    g=(g-1)*3+1;
    b=b/2+b%2;
    b=(b-1)*3+2;

    r=MAX(r,g);
    r=MAX(r,b);

    printf("%d\n",30+r);
    return 0;
}

#include <iostream>
#include <math.h>

using namespace std;
int r,g,b;
int main()
{
      cin>>r>>g>>b;
    if (r%2!=0) r++;
    r/=2;
    if (g%2!=0) g++;
    g/=2;
    if (b%2!=0) b++;
    b/=2;
     cout<<30+max(3*r-3,max(3*g-2,3*b-1));
}

#include <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <iomanip>
#include <stdio.h>
#include <cstring>
#include <vector>
#include <math.h>
#include <queue>
#include <stack>
#include <set>
#include <map>

using namespace std;

#define fi first
#define se second

typedef long long ll;

const int N = 1111111;
const int INF = 1000000000, mod = 1000000007;
const ll LLINF = 1000000000000000000ll;

int main () {

    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    int r, g, b;
    scanf("%d%d%d", &r, &g, &b);

    int res = 0;

    if (r > 0) {
        res = max(res, 30 + (r - 1) / 2 * 3);
    }

    if (g > 0) {
        res = max(res, 31 + (g - 1) / 2 * 3);
    }

    if (b > 0) {
        res = max(res, 32 + (b - 1) / 2 * 3);
    }

    printf("%d\n", res);
    return 0;
}

#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
    int r,g,b;
    cin >> r >> g >> b;
    cout << 30 + max({((r+1)/2-1)*3,((g+1)/2-1)*3+1,((b+1)/2-1)*3+2});
	return 0;
}

#include <cstdlib>
#include <cctype>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <iostream>
#include <sstream>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <fstream>
#include <numeric>
#include <iomanip>
#include <bitset>
#include <list>
#include <stdexcept>
#include <functional>
#include <utility>
#include <ctime>
using namespace std;

typedef unsigned long long ULL;
typedef long long LL;
typedef set <int> si;
typedef pair< int,int > pii;
typedef pair< int, pii > pip;
typedef vector< pii > vii;
typedef vector < vii > vvii;
typedef vector< int > vi;
typedef vector< vi > vvi;
typedef vector<string> vs;
typedef vector<double> vd;

#define pb push_back
#define mp make_pair
#define MAX 50

#define REP(i,n) FOR(i,0,n)
#define FOR(i,a,b) for(int i = a; i < b; i++)
#define ROF(i,a,b) for(int i=a;i>b;i--)
#define GI ({int t;scanf("%d",&t);t;})
#define GL ({LL t;scanf("%lld",&t);t;})
#define GD ({double t;scanf("%lf",&t);t;})
#define SET(x,a) memset(x,a,sizeof(x))
#define all(a) (a.begin(),a.end())
#define rall(a) (a.rbegin(),a.rend())
#define INF (int)1e9
#define EPS (double)1e-9

int main()
{
  int r,g,b;
  r=GI;g=GI;b=GI;
  //cout<<1+((int)ceil((float)g/2)-1)*3<<endl;
  int ans=max(0+((int)ceil((float)r/2)-1)*3,max(1+((int)ceil((float)g/2)-1)*3,2+((int)ceil((float)b/2)-1)*3))+30;
  cout<<ans;
  return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int r,g,b;
    cin>>r>>g>>b;
    char mc;
    int m=0;
    r += r%2;
    g += g%2;
    b += b%2;
    if(b>=r && b>=g)
    {
        mc='b';
        m = b;
    }
    else if(g>=r && g>=b)
    {
        mc='g';
        m = g;
    }
    else if(r>=g && r>=b)
    {
        mc='r';
        m = r;
    }
    int mr=30,mg=31,mb=32;
    int d = ceil(m/2);
    if(mc=='r')
    {
        cout<<30+(d-1)*3<<endl;
    }
    else if(mc=='g')
    {
        cout<<31+(d-1)*3<<endl;
    }
    else if(mc=='b')
    {
        cout<<32+(d-1)*3<<endl;
    }
}

#include <iostream>
using namespace std;
int main()
{
    int r,g,b;
    cin>>r>>g>>b;
    int max=r,color=0;
    if(max<=(g+1)/2*2){
        max=g;
        color=1;
    }
    if(max<=(b+1)/2*2){
        max=b;
        color=2;
    }
    cout<<3*((max-1)/2)+color+30;
    return 0;
}

#include <iostream>
using namespace std;

int main(){
	int r, g, b, ans = 30, p = 1;
	cin >> r >> g >> b;

	r-=2;
	for(; r > 0 || g > 0 || b > 0; ans++, p++){
		if(p%3 == 1) g-=2;
		else if(p%3 == 2) b-=2;
		else r-=2;
	}

	cout << ans;
}

#include<iostream>
#include<algorithm>
#include<stdio.h>
using namespace std;
int main()
{
	int r,g,b,t;
	while(scanf("%d%d%d",&r,&g,&b)!=EOF){
		    t=29;
        while(1){
			r-=2;t++;
			if(r<=0&&g<=0&&b<=0) break;
			g-=2;t++;
	        if(r<=0&&g<=0&&b<=0) break;
			b-=2;t++;
            if(r<=0&&g<=0&&b<=0) break;
		}
		printf("%d\n",t);
	}

}

#include <bits/stdc++.h>

using namespace std;

int main() {
	int ans = 0;
	for (int i = 0; i < 3; ++i) {
		int a;
		scanf("%d", &a);
		if (a > 0) {
			a = (a + 1) / 2 - 1;
			ans = max(ans, i + a * 3 + 30);
		}
	}
	printf("%d\n", ans);
	return 0;
}

#include<bits/stdc++.h>
using namespace std;

int main()
{
    double r,g,b,res;
    cin>>r>>g>>b;
    r=ceil(r/2);
    g=ceil(g/2);
    b=ceil(b/2);
    if(r>g && r>b)
    {
        res=30+(r-1)*3;
    }
    else if(g>=r && g>b)
    {
        res=31+(g-1)*3;
    }
    else
    {
        res=32+(b-1)*3;
    }
    cout<<res<<endl;
}

#include <bits/stdc++.h>

#define ll long long int
#define IO ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);

using namespace std;

const int INF = 1e9 + 7;

int main() {
	IO;

	int r, g, b;
	cin >> r >> g >> b;

	int time = -1, turn = 0;

	while( r > 0||g > 0||b > 0){

		if (turn % 3 == 0 && r > 0) {
			r-=2;
		}
		if (turn % 3 == 1 && g > 0) {
			g-=2;
		}
		if (turn % 3 == 2 && b > 0) {
			b-=2;
		}
		++turn;
		++time;
		//if (turn == 30)
			//time+= 30;
	}
	//cout << time << " " << turn << " " << turn/30 << endl;
	time+= 30;

	cout << time;
}

#include <iostream>
#include <algorithm>

int solve(){
    int r, g, b;
    std::cin>>r>>g>>b;
    std::cout<<std::max((r+1)/2*3, std::max((g+1)/2*3+1, (b+1)/2*3+2))+27;
    return 0;
}
int main(){
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(NULL); std::cout.tie(NULL);
    solve();
}

#include <bits/stdc++.h>
typedef long long ll;
#define view(x,y,z) cout << x << ' ' << y << ' ' << z << endl;
using namespace std;
#define T()	ll tc;	cin>>tc; while(tc--)
typedef pair<ll, ll> ii;
typedef vector<ii> vii;
typedef vector<ll> vi;
#define rep(i, v)       for(int i=0;i<sz(v);++i)
#define all(v)			((v).begin()), ((v).end())
#define sz(v)			((int)((v).size()))
#define clr(v, d) memset(v, d, sizeof(v))
#define FI(n) for(ll i=0;i<n;++i)
#define FJ(n) for(int j=0;j<n;++j)
#define FK(n) for(int k=0;k<n;++k)
#define rd(n) ll n;scanf("%I64d",&n);
#define rd2(n,k) ll n, k;scanf("%I64d %I64d",&n,&k);
#define rd3(n,k,l) ll n, k,l;scanf("%I64d %I64d %I64d",&n,&k,&l);
#define min3(x,y,z) min(min(x,y),z)
#define max3(x,y,z) max(max(x,y),z)
#define udebug freopen("keys.in","rt",stdin);freopen("ss.txt","wt",stdout);
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
ll OO = LONG_MAX, M = 1e6 + 3;
const double pi = acos(-1);
int cnt(int i) {
	return (i * i - i) / 2;
}

int main() {
	IOS;

	int r,g,b;
	cin>>r>>g>>b;
	int mx=max3(ceil(r/2.0),ceil(b/2.0),ceil(g/2.0));
	if(mx==ceil(b/2.0)) {
		cout<<3*mx+30-1;
	} else if(mx==ceil(g/2.0)) {
		cout<<3*mx+30-2;
	} else {
		cout<<3*mx+30-3;
	}
	return 0;
}
/*int lcm(int a, int b) {
 return (a * b) / __gcd(a, b);
 }
 int main() {
 IOS;

 int a,b,c,d;
 cin>>a>>b>>c>>d;

 cout<<lcm(a,c);
 return 0;
 }
 */

#include <iostream>
#include <string>
using namespace std;
int r,g,b;
int main()
{
  cin>>r>>g>>b;
  if (r%2==1) r++;
  if (g%2==1) g++;
  if (b%2==1) b++;
  if (b>=r&&b>=g)
  cout<<30+b+b/2-1;
  else
  if (g>=r)
  cout<<30+g+g/2-2;
  else
  cout<<30+r+r/2-3;
}

/*                        ______
 _______   /\     |``\   |        |  /
    |     /  \    |__/   |____    |/
    |    / _ _\   |  \   |        |\
    |   /      \  |   \  |______  |  \

            Dept. of CSE
        Comilla  University

*/
#include<bits/stdc++.h>
#define pi 2*acos(0.0)
#define ll long long
#define FIO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define Node struct node
#define spc " "
#define  E  2.71828182845904523536
using namespace std;
///check n=1;
///check corner case;
map<char,ll>check;
int main()
{
    ll r,g,b;
    ll n,i,j,ans=0;cin>>r>>g>>b;
    (r%2==0)?r=r/2 : r=r/2+1;
    (g%2==0)?g=g/2 : g=g/2+1;
    (b%2==0) ? b=b/2 : b=b/2+1;
    ll x=max(r,max(g,b));
    if(x==b)cout<<x+x+x+29<<endl;
    else if(x==g)cout<<x+x+(x-1)+29<<endl;
    else cout<<x+(x-1)+(x-1)+29<<endl;
return 0;
}

#include <iostream>
using namespace std;

int main(){
	int r, g, b;
	cin >> r >> g >> b;
	int cur_t, n, max_t = 0;
	cur_t = 0;
	n = r/2 + r%2;
	cur_t = 3*(n-1) + 30;
	if (max_t < cur_t) max_t = cur_t;
	cur_t = 0;
	n = g/2 + g%2;
	cur_t = 3*(n-1) + 31;
	if (max_t < cur_t) max_t = cur_t;
	cur_t = 0;
	n = b/2 + b%2;
	cur_t = 3*(n-1) + 32;
	if (max_t < cur_t) max_t = cur_t;
	cout << max_t << endl;

	return 0;
}

#include <iostream>
using namespace std;

int max(int a, int b){
	return (a > b) ? a : b;
}

int main()
{
	int r, g, b;
	cin >> r >> g >> b;
	r = 3 * ((r + 1) / 2) + 27;
	b = 3 * ((b + 1) / 2) + 29;
	g = 3 * ((g + 1) / 2) + 28;
	cout << max(max(r, g), b);
	return 0;
}

#define _CRT_SECURE_NO_WARNINGS
#pragma comment(linker, "/STACK:64000000")
#define _USE_MATH_DEFINES
#include<iostream>
#include<vector>
#include<string>
#include<stack>
#include<algorithm>
#include<cmath>
#include<set>
#include<queue>
#include<sstream>
#include<utility>
#include<map>

using std::pair;
using std::stringstream;
using std::next_permutation;
using std::sqrt;
using std::priority_queue;
using std::sort;
using std::stack;
using std::string;
using std::vector;
using std::cin;
using std::cout;
using std::endl;
using std::min;
using std::max;
using std::set;
using std::swap;
using std::random_shuffle;
using std::queue;
using std::sin;
using std::cos;
using std::make_pair;
using std::cos;
using std::cerr;
using std::map;

typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
const long double PI = 3.14159265358979323846;
const double eps = 1e-12;

int main() {
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	int r, g, b;
	cin >> r >> g >> b;
	int res = 0;
	if (r)
		res = max((r - 1) / 2 * 3, res);
	if (g)
		res = max(1 + (g - 1) / 2 * 3, res);
	if (b)
		res = max(2 + (b - 1) / 2 * 3, res);
	cout << res + 30 << endl;
	return 0;
}

#include<iostream>
#include<vector>
using namespace std;
int student[4];
void count(int i,int *student)
{
   int j;
   for (j=1;j<=2;j++)
        if (student[i]>=1)student[i]=student[i]-1;

}
int main()
{
   int r,g,b,time,i;
   while(cin>>r>>g>>b)
   {
     student[1]=r;
     student[2]=g;
     student[3]=b;
     time=29;
     i=1;
     while (!((student[1]==0 )&&(student[2]==0)&&(student[3]==0)))
     {
       if (student[i]>0) count(i,student);
       time+=1;
       if (i<=2) i++; else i=1;

     }
     cout<<time<<endl;
   }

   return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define mem(x,y) memset(x,y,sizeof(x))
#define bitcount    __builtin_popcountll
#define mod 1000000007
#define N 1000009
#define fast ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ss(s) cin>>s;
#define si(x)  scanf("%d",&x);
#define sl(x)  cin>>x;
#define pb push_back
#define mp make_pair
#define all(v) v.begin(),v.end()
#define S second
#define F first
#define ll long long
//#define TRACE

#ifdef TRACE
#define trace1(x)                cerr << #x << ": " << x << endl;
#define trace2(x, y)             cerr << #x << ": " << x << " | " << #y << ": " << y << endl;
#define trace3(x, y, z)          cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl;
#define trace4(a, b, c, d)       cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl;
#define trace5(a, b, c, d, e)    cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl;
#define trace6(a, b, c, d, e, f) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " << #f << ": " << f << endl;

#else

#define trace1(x)
#define trace2(x, y)
#define trace3(x, y, z)
#define trace4(a, b, c, d)
#define trace5(a, b, c, d, e)
#define trace6(a, b, c, d, e, f)
#endif
ll power(ll a,ll b) {ll res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
string a,b,c;
int q,n,t;
int arr[N];
int brr[N];
int main(){
//fast                          //uncomment on submission
int r,g,b;
cin>>r>>g>>b;
r--;
g--;
b--;
int mr,mb,mg;
if(r==-1){
	mr=0;
}
else
 mr=(r /2)*3;
if(g==-1)mg=0;
else
 mg= max(0,(g/2)*3 + 1);
if(b==-1) mb=0;
else mb= max(0,(b/2)*3 +2);
cout<<max(mg,max(mr,mb))+30;

}

#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
    int r,g,b;
    cin >> r >> g >> b;
    cout << 30 + max({((r+1)/2-1)*3,((g+1)/2-1)*3+1,((b+1)/2-1)*3+2});
	return 0;
}

#include <iostream>
#include <cmath>
#include <complex>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <iomanip>
#include <functional>
#include <iterator>
#include <numeric>
#include <queue>

const double PI(acos(-1.0));
const double PI_2 = PI * 2.0;
double eps = 1e-9;

#define pb push_back
#define mp(a,b) make_pair(a,b)
#define all(x) x.begin(), x.end()
#define sqr(x) ((x)*(x))
#define F first
#define S second
#define inf (ll)(1e9+7)
#define infll (ll)(1e18+3)
#define sz(x) ((ll)x.size())
#define bits(x) __builtin_popcount(x)
#define bitsl(x) __builtin_popcountll(x)
#define rep(i, a, b) for (ll (i) = (a); i <= (b); ++(i))
#define forn(i, n) rep(i, 0, ((ll)n)-1)
#define INF 200000
#define rz resize

using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
typedef vector < ll > vll;
typedef vector<ll> vi;
typedef pair < ll, ll > pll;
typedef pair < ll, ll > pii;
typedef vector<vi> vii;
typedef vector<vi> vvi;
typedef vector<ull> vull;
typedef vector<pll> vpll;

int main() {
    ios_base::sync_with_stdio(false);
    // freopen("input.txt", "r", stdin);
    int r, g, b;
    cin >> r >> g >> b;
    int t = 0, k = 0;
    while(r+g+b > 0) {
        k++;
        if (t == 0) {
            r -= min(2, r);
        } else if (t == 1) {
            g -= min(2, g);
        } else b -= min(2, b);

        t = (t+1)%3;
    }

    cout << k-1+30 << endl;

    return 0;
}

// Thu Dec 01 2016 19:54:22 GMT+0300 (MSK)

#include "iostream"
#include "string.h"
using namespace std;

int main()
{
   int r,g,b;
   while(cin>>r>>g>>b)
   {
       r=(r+1)/2;
       g=(g+1)/2;
       b=(b+1)/2;
       if(b>=g&&b>=r)
       cout<<30+3*b-1<<endl;
       else if(g>=r)
       cout<<30+3*g-2<<endl;
       else
       cout<<30+3*r-3<<endl;
   }
    return 0;
}

#include <iostream>

using namespace std;

int main() {
    int tempo = 29, r, g, b, car = -1;

    cin >> r >> g >> b;

    while(r || g || b) {
        if(car == 2) {
            car = -1;
        }
        ++car;
        switch(car) {
            case 1://carro verde
                if(g > 1) {
                    g -= 2;
                }
                else {
                    g = 0;
                }
                break;
            case 2: // azul
                if(b > 1) {
                    b -= 2;
                }
                else {
                    b = 0;
                }
                break;
            default: // carro vermelho
                if(r > 1) {
                    r -= 2;
                }
                else {
                    r = 0;
                }
                break;
        }
        ++tempo;
    }

    cout << tempo << endl;
    return 0;
}
// 1515006495997

#include<bits/stdc++.h>
using namespace std;
int r,g,b,sum=0,ti=1;
int main()
{
	cin>>r>>g>>b;
	while(r>0||g>0||b>0)
	{
		if((ti-1)%3==0)r-=2;
		if((ti-2)%3==0)g-=2;
		if(ti%3==0)b-=2;
		sum++;
		ti++;
	}
	sum+=29;
	cout<<sum;
	return 0;
}

#include<map>
#include<cmath>
#include<stack>
#include<queue>
#include<cstdio>
#include<vector>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
typedef long long ll;
int a,b,c;
int main(){
    scanf("%d%d%d",&a,&b,&c);
    printf("%d\n",max(((a/2)+(a%2)-1)*3+1,max(((b/2)+(b%2)-1)*3+2,((c/2)+(c%2)-1)*3+3))+29);
    return 0;
}

#include <iostream>
using namespace std;
#define ll long long

void solve() {
    int r, g, b, ans;
    cin >> r >> g >> b;
    int i = ((r/2)+(r%2)-1)*3 + 30;
    int j = ((g/2)+(g%2)-1)*3 + 31;
    int k = ((b/2)+(b%2)-1)*3 + 32;
    ans = max(max(i, j), k);
    cout << ans;
}

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    int t = 1;
    //int t; cin >> t;
    while(t--)
        solve();
    return 0;
}

#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main() {
    int f[3];
    while (scanf("%d%d%d", &f[0], &f[1], &f[2] ) == 3) {
        int now = 0, tot = 0, sum = f[0] + f[1] + f[2];
        while (sum) {
            tot++;
            if (f[now]) {
                if (f[now] >= 2) {
                    f[now] -= 2;
                    sum -= 2;
                } else {
                    f[now] = 0;
                    sum--;
                }
            }
            now = (now+1) % 3;
        }
        printf("%d\n", tot+30-1);
    }
    return 0;
}

/*orjrbtcmcqntqftasrkkhbgcibmqhlknilkccmofateieqjdfl*/

#include <bits/stdc++.h>

using namespace std;

int r, g, b, mx, i;

int main() {
	cin >> r >> g >> b;
	r += r % 2;
	g += g % 2;
	b += b % 2;
	mx = max(r, max(g, b));
	i = mx == b ? 2: mx == g? 1: 0;
	cout << 30 + (mx / 2 - 1) * 3 + i;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

int r,g,b,t = -1;

int main(){
#ifndef ONLINE_JUDGE
    freopen("input.in","r",stdin);
#endif
    scanf("%d%d%d",&r,&g,&b);
    r = ceil(r*1.0/2.0); g = ceil(g*1.0/2.0);
    b = ceil(b*1.0/2.0);
    while(1){
    	if(r <= 1 && g <= 1 && b <= 1){
    		if(b) t+= 3;
    		else if(g) t+= 2;
    		else if(r) ++t;
    		break;
    	}
    	t += 3;
    	if(r) --r; if(g) --g; if(b) --b;
    }
    printf("%d",t+30);
    return 0;
}

#include<iostream>
#include<stdio.h>
using namespace  std;
int main(){
	int r,g,b;
	while(scanf("%d %d %d",&r,&g,&b)==3){
		int nr,ng,nb;
		if(r!=0)nr=(r-1)/2+1;
		else
			nr=0;
		if(g!=0)
		ng=(g-1)/2+1;
		else
			ng=0;
		if(b!=0)
		nb=(b-1)/2+1;
		else
			nb=0;
		int t1,t2,t3;
		if(nr!=0)
			t1=(nr-1)*3;
		else
			t1=0;
		if(ng!=0)t2=(ng-1)*3+1;
		else
			t2=0;

		if(nb!=0) t3=(nb-1)*3+2;
		else
			t3=0;
		int ans=max(t1,t2);
		ans=max(ans,t3);
		printf("%d\n",ans+30);
	}
}

#include <iostream>
using namespace std;

int main(void)
{
    int r, g, b;
    cin >> r >> g >> b;
    int i;
    for (i = 0; r > 0 || g > 0 || b > 0 ; ++i)
    {
        if (i % 3 == 0)
            r -= 2;
        else if (i % 3 == 1)
            g -= 2;
        else
            b -= 2;
    }
    cout << 30 + i - 1;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	#ifndef ONLINE_JUDGE
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	#endif
	int r, g, b;
	cin >> r >> g >> b;
	int ans = 30;
	// r -= 2;
	// int t = 2;
	// while(r > 0 || g > 0 || b > 0){
	// 	if(t%3 == 2){
	// 		ans++;
	// 		g -= 2;
	// 	}else if(t%3 == 1){
	// 		ans++;
	// 		r -= 2;
	// 	}else if(t%3 == 0){
	// 		ans++;
	// 		b -= 2;
	// 	}
	// 	t++;
	// 	// cout << r << g << b << endl;
	// }
	ans += max(0 + ((int)ceil(r/(double)2)-1)*3, max(1+((int)ceil(g/(double)2)-1)*3, 2+((int)ceil(b/(double)2)-1)*3));
	cout << ans << endl;
	return 0;
	}

//http://codeforces.com/problemset/problem/90/A
/**/
#include<bits/stdc++.h>
using namespace std;

#define pb push_back
#define FOR(i, begin, end) for(__typeof(end) i = (begin); i < (end); i++)
#define For(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define all(v) v.begin(),v.end()
#define minv(v) min_element(all(v))
#define maxv(v) max_element(all(v))
#define V vector
typedef long long ll;
/***********************************************/
/* Dear online judge:
 * I've read the problem, and tried to solve it.
 * Even if you don't accept my solution, you should respect my effort.
 * I hope my code compile and get accepted. O.o
 *      ____________
 *     /         __ \
 *    /   __    |  | \
 *   /   |__|   |  |  \
 *  (           |__|   )
 *   \                /
 *    \      ___     /
 *     \____________/
 */
const ll mod = 1000000009;
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int a[3];
    cin>>a[0]>>a[1]>>a[2];
    a[0] = a[0]/2 + (a[0]&1) - 1;
    a[1] = a[1]/2 + (a[1]&1) - 1;
    a[2] = a[2]/2 + (a[2]&1) - 1;
    int max = max_element(a,a+3) - a;
    if(max == 0 && a[max] == a[max+1])max++;
    if(max == 0 && a[max] == a[max+2])max=+2;
    if(max == 1 && a[max] == a[max+1])max++;
    cout<<a[max]*3 + max + 30;
    return 0;
}
/**/

/**
 * Dont raise your voice, improve your argument.
 * --Desmond Tutu
 */

#include <bits/stdc++.h>
using namespace std;

#define DEBUG
#ifndef DEBUG
#define endl "\n"
#endif

const double PI = acos(-1);
typedef long long ll;
#define fori(n) for(ll i=0; i<(n); i++)

#define cins(s) string s; cin>>s;
#define cini(i) int i; cin>>i;
#define cinll(l) ll l; cin>>l;
#define cind(d) double d; cin>>d;
#define cinai(a, n) vi a(n); fori(n) { cin>>a[i]; }
#define cinall(a, n) vll a(n); fori(n) { cin>>a[i]; }
#define cinas(s, n) vs s(n); fori(n) { cin>>s[i]; }
#define cinad(a, n) vd a(n); fori(n) { cin>>a[i]; }

typedef pair<int, int> pii;
typedef pair<double, double> pdd;
typedef vector<double> vd;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<string> vs;
typedef vector<ll> vll;

void solve() {
	vi a(3);
	cin >> a[0] >> a[1] >> a[2];
	int ans = 0;
	int idx = 0;
	while (true) {
		if (a[idx % 3] > 0) {
			a[idx % 3] = max(0, a[idx % 3] - 2);
		}
		if (a[0] == 0 && a[1] == 0 && a[2] == 0)
			break;
		idx++;
	}
	ans = 30 + idx;
	cout << ans << endl;
}

int main() {
	cin.tie(nullptr);
	std::ios::sync_with_stdio(false);
	solve();
}

#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <string>
#include <set>
#include <map>

using namespace std;

const int N = 500010;

int i, j, n, m, k, a[N];

int main()
{
    ios_base::sync_with_stdio(0);
    int r, g, b;
    cin >> r >> g >> b;
    int i = 0, last = -50;
    while (r > 0 || g > 0 || b > 0)
    {
        if (i % 3 == 0)
            r -= 2;
        else if (i % 3 == 1)
            g -= 2;
        else
            b -= 2;
        i ++;
    }
    cout << i + 29;
    return 0;
}

// Thu Dec 01 2016 19:50:14 GMT+0300 (MSK)

#include <iostream>
using namespace std;
int main(){
int b,g,r,res=0;
    cin>>b>>g>>r;
    if (b) res=30+((b-1)/2)*3;
    if (g) res=max(res,31+((g-1)/2)*3);
    if (r) res=max(res,32+((r-1)/2)*3);
    cout<<res<<endl;
    return 0;
    }

#include<bits/stdc++.h>
using namespace std;
int r,g,b,a;
int top(int r,int g,int b){
    a=(r-1)/2*3;
    if(g)a=max(a,1+(g-1)/2*3);
    if(b)a=max(a,2+(b-1)/2*3);
    return a;
}
int main(){
    cin>>r>>g>>b;
    cout<<top(r,g,b)+30;
}

#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define r_0 return 0
#define fr first
#define se second
using namespace std;
ll  n , m   ,x  , i , z  ,c ,  used[1001] ,cnt , ans  , sum , rem , tre , ert ;
vector< ll >v , v1 ;
string s ,s1 ,s2;
vector< pair < ll , ll > > p ;
set < char > se ;
int main()
{
   cin >> n >> m >> x ;
   z = max( n , max( m , x ) ) ;
   cnt += 30 ;
   if( n >=2 )
    n-=2;
   else
    n = 0 ;
   while(true)
   {
    if( n == 0 and m == 0 and x == 0 )
        break ;
       if( m >= 2 )
       cnt ++ , m -= 2 ;
      else if( m < 2)
      cnt ++ , m=0 ;
       if( n == 0 and m == 0 and x == 0 )
        break ;
      if( x >= 2 )
        x -=2 , cnt ++ ;
    else if( x < 2  )
        x = 0 , cnt ++ ;
    if( n == 0 and m == 0 and x == 0 )
        break ;
    if( n >= 2 )
        n -= 2 , cnt ++ ;
    else if( n < 2)
        n = 0 , cnt ++ ;
        //cout << n << " " << m << " " << x  << endl ;
    if( n == 0 and m == 0 and x == 0 )
        break ;
   }
   cout << cnt ;
}

#include <iostream>
#include <algorithm>
#include <string>
#include <cstring>
#include <cmath>
#include <queue>
#include <deque>
#include <vector>
#include <cstdlib>
#include <cstdlib>
#include <cstdio>
#include <sstream>
#include <stack>
#include <set>
#include <functional>
#include <map>
#define eps 1e-8
using namespace std;

int main ()
{
    //freopen ("in.txt","r",stdin);
    //freopen ("out.txt","w",stdout);

    int R,G,B;
    while (cin>>R>>G>>B)
    {
        int Res = 0;
        Res = max(Res, 30+(R%2+R/2-1)*3);
        Res = max(Res, 31+(G%2+G/2-1)*3);
        Res = max(Res, 32+(B%2+B/2-1)*3);
        cout<<Res<<endl;
    }
    return 0;
}

#include <iostream>
using namespace std;

int main(){
	int r, g, b, ans = 30, p = 1;
	cin >> r >> g >> b;

	r-=2;
	for(; r > 0 || g > 0 || b > 0; ans++, p++){
		if(p%3 == 1) g-=2;
		else if(p%3 == 2) b-=2;
		else r-=2;
	}

	cout << ans;
}

#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <string>
#include <set>
#include <map>

using namespace std;

const int N = 500010;

int i, j, n, m, k, a[N];

int main()
{
    ios_base::sync_with_stdio(0);
    int r, g, b;
    cin >> r >> g >> b;
    int i = 0, last = -50;
    while (r > 0 || g > 0 || b > 0)
    {
        if (i % 3 == 0)
            r -= 2;
        else if (i % 3 == 1)
            g -= 2;
        else
            b -= 2;
        i ++;
    }
    cout << i + 29;
    return 0;
}
/*
*/
/* Mon Feb 27 2017 18:44:27 GMT+0300 (RTZ 2 (зима)) */

//be name khoda
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int r,g,b,o,ans=0;
	cin>>r>>g>>b;
	{
	if(r%2)
		r=r/2+1;
	else
		r=r/2;
	}
	{
	if(g%2)
		g=g/2+1;
	else
		g=g/2;
	}
	{
	if(b%2)
		b=b/2+1;
	else
		b=b/2;
	}
	o=max(r,max(g,b));
	if(o==r)
		ans=3*(r-1);
	if(o==g)
		ans=3*(g-1)+1;
	if(o==b)
		ans=3*(b-1)+2;
	cout<<ans+30<<endl;
	return 0;
}

#include<bits/stdc++.h>
#include <cmath>
using namespace std ;
#define ll 		long long
#define ios 		ios_base::sync_with_stdio(false);   cin.tie(NULL);
#define FOR(i,n) 	for(long long i=0;i<n;i++)
#define nl 		"\n"
#define buffer     	cin.ignore(numeric_limits<streamsize>::max(),'\n');

int main()
{
double a,b,c,max;
cin>>a>>b>>c;
a=ceil(a/2);
b=ceil(b/2);
c=ceil(c/2);
// cout<<a<<b<<c;
max=c;
if(a>c && a>b)
max=a;
else if(b>c && b>=a)
max=b;
// cout<<max;
if(max==c)
cout<<32+3*(max-1);
else if(max==b)
cout<<31+3*(max-1);
else
cout<<30+3*(max-1);

return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int r,g,b;
    cin>>r>>g>>b;
    //int count=30;
    int rcount=ceil((double) r/2);
    int gcount=ceil((double)g/2);
    int bcount=ceil((double)b/2);
    int maxm = max(gcount,bcount);
    maxm = max(rcount,maxm);
    if(rcount>gcount && rcount>bcount) {
        if(rcount==1) {
            if(gcount==0 && bcount==0) cout<<30;
            else {
                if(bcount==0) cout<<31;
                else cout<<32;
            }
        }
        else {
            cout<<30+3*(rcount-1);
        }
        return 0;
    }
    else if(gcount>=rcount && gcount>bcount) {
        if(gcount==1) {
            if(bcount==0) cout<<31;
            else cout<<32;
        }
        else {
            cout<<31+3*(gcount-1);
        }
    }
    else {
        cout<<32+3*(bcount-1);
    }
}

// R G B R

#include <iostream>

using namespace std;

int main() {
    int tempo = 29, r, g, b, car = -1;

    cin >> r >> g >> b;

    while(r || g || b) {
        if(car == 2) {
            car = -1;
        }
        ++car;
        switch(car) {
            case 1://carro verde
                if(g > 1) {
                    g -= 2;
                }
                else {
                    g = 0;
                }
                break;
            case 2: // azul
                if(b > 1) {
                    b -= 2;
                }
                else {
                    b = 0;
                }
                break;
            default: // carro vermelho
                if(r > 1) {
                    r -= 2;
                }
                else {
                    r = 0;
                }
                break;
        }
        ++tempo;
    }

    cout << tempo << endl;
    return 0;
}
// 1515006744319

// Solution by Aytbayev Sherzat
#pragma comment(linker, "/STACK:64000000")
#define _CRT_NO_WARNINGS

#include<iostream>
#include<fstream>
#include<ctime>
#include<algorithm>
#include<map>
#include<ctime>
#include<cstdio>
#include<string>
#include<math.h>
#include<vector>
#include<set>
#include<deque>
#include<cstdlib>
#include<utility>
#define abs(x) ((x) < 0 ? -(x) : (x))
#define mp make_pair
#define PI pair<int, int>
#define VI vector <int>
#define VB vector <bool>
#define FOR(i, n) for(int (i) = 0; (i) < (n); (i)++)
#define VP vector <PI>
#define INF 1 << 30
#define pb push_back
#define ll long long
#define fi first
#define se second
#define debug cerr << "a ";
using namespace std;
int main(){

	#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	#endif

	int r, g, b, k = 0;

	cin >> r >> g >> b;

	while(r > 0 || g > 0 || b > 0){
		k++;
		if(k % 3 == 1) r -= min(2, r);
		else if(k % 3 == 2) g -= min(2, g);
		else b -= min(2, b);
//		cout << k << " " << r << " " << g << " " << b << endl;
	}

	cout << k + 29;

	return 0;
}

#include<iostream>
using namespace std;

int main() {
    int r, g, b;
    cin >> r >> g>>b;

    int r1 = -3, g1 = -2, b1 = -1;
    int r2, g2, b2;
    r2 = g2 = b2 = 0;
    int s = 30;
    while (r > 0) {
        r1 += 3;
        r -= 2;
    }
    while (g > 0) {
        g1 += 3;
        g -= 2;
    }
    while (b > 0) {
        b1 += 3;
        b -= 2;
    }
    int mx = max(b1, g1);
    mx = max(mx, r1);

        cout << s + mx << endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

int r,g,b,t = -1;

int main(){
#ifndef ONLINE_JUDGE
    freopen("input.in","r",stdin);
#endif
    scanf("%d%d%d",&r,&g,&b);
    r = ceil(r*1.0/2.0); g = ceil(g*1.0/2.0);
    b = ceil(b*1.0/2.0);
    while(1){
    	if(r <= 1 && g <= 1 && b <= 1){
    		if(b) t+= 3;
    		else if(g) t+= 2;
    		else if(r) ++t;
    		break;
    	}
    	t += 3;
    	if(r) --r; if(g) --g; if(b) --b;
    }
    printf("%d",t+30);
    return 0;
}

#include <iostream>
using namespace std;
int main(int argc, const char * argv[]) {
    //cable way
    int m,n, total;
    total = 29;
    int colors[3];
    for (int i = 0; i< 3; i++){
        cin>> colors[i];
    }
    m= 0;
    n = 0;
    for (int j = 0; j< 3; j++){ //redefine color
        if (colors[j]%2==1){
            colors[j]  = colors[j]/2+1;
        }
        else {
            colors[j] = colors[j]/2;
        }
    }
    for (int i = 0; i< 3; i++){
        if (colors[i]>=m){
            m = colors[i];
            n = i;
        }
    }
    n++;
    total = 29 + 3*(m-1) + n;
    cout << total;
    //81 --> works
//    bool product= false;
//    cin>> n;
//    for (int i = 1; i<= 9; i++){
//        int h = n/i;
//        int g = n%i;
//        if (g == 0){
//            if (1<=h && h<=9){
//                product = true;
//            }
//        }
//    }
//    if (product){
//        cout<< "Yes";
//    }
//    else {
//        cout << "No";
//    }
    return 0;
}

/*int div(int n)
{
    int cnt = 0;
    for (int i = 2; i*i<=n; i++) {
        if (n % i == 0) {

                return i;
        }
    }
    return n;
}   */

/*
inline bool cmp (const pii &a, const pii &b)
{
    if (a.first != b.first)
        return a.first > b.first;

    return a.second < b.second;
}
sort(a,a+n,cmp);
 */

#include<bits/stdc++.h>
#include<string>
using namespace std;

int main()
{

   int r,g,b;
   cin>>r>>g>>b;

   int t=30;

   int x=r/2+r%2;
   int y=g/2+g%2;
   int z=b/2+b%2;

   int a=max(x,max(y,z));
   if(a==z)
      t+=3*ceil(b*1.0/2)-1;
    else if(a==y)
     t+=3*ceil(g*1.0/2)-2;
    else if(a==x)
     t+=3*ceil(r*1.0/2)-3;

    cout<<t;

  return 0;

}

#include <bits/stdc++.h>
using namespace std;
#define ll long long int
void fastio(){
	 ios_base::sync_with_stdio(false);
	 cin.tie(0);
	 cout.tie(0);
}
int main() {
	fastio();
	ll r,g,b;
	cin>>r>>g>>b;
	string s="";
	for(int i=0;i<1000;i++)
	{
		s+="rgb";
	}
	ll ans=30;
	r=max(0LL,r-2);
	for(int i=1;i<s.size();i++)
	{
		if(r==0&&b==0&&g==0)
		break;
		if(r>0&&s[i]=='r')
		r=max(0LL,r-2);
		if(g>0&&s[i]=='g')
		g=max(0LL,g-2);
		if(b>0&&s[i]=='b')
		b=max(0LL,b-2);

		ans++;
	}
	cout<<ans;

	return 0;
}

/*
    In the Name Of God
*
*
*
*/

/// {{{ include
#include <algorithm>
#include <set>
#include <vector>
#include <string>
#include <cmath>
#include <map>
#include <functional>
#include <numeric>
#include <list>
#include <queue>
#include <climits>
#include <cstring>
#include <stack>
#include <stdlib.h>
#include <cctype>
#include <iomanip>
#include <iostream>
#include <cstdio>
#include <complex>
/// }}} include
using namespace std;

const int maxn = 11;
const double eps=1e-9;
const int mod=1000000009;
const int inf =0x7ffffff;
const int maxlog =33;

typedef long long ll;
typedef vector<int> VI;
typedef pair <int,int> PII;

/// {{{ define
#define all(a)  a.begin(),a.end()
#define ff   first
#define ss  second
#define pk  pop_back
#define sqr(x)  ((x)*(x))
#define cub(x)  ((x)*(x)*(x))
#define pb  push_back
#define mp  make_pair
#define mem(f, a) memset(f, a, sizeof(f))
#define cl  clear()
#define rall(c) (c).rbegin(), (c).rend()
//#define int long long
#define bcnt(x) ((__builtin_popcountll(x)))
#define dbg(x) cerr<<((#x))<<" = "<<((x))<<" "<<endl
/// }}} define

template <class Int> inline int size (const Int &a){return (int)a.size();}

int arr[555], stp[555], i;

int solve(int k,int n) {
   if(n == 0) return 0;
   int sum = 0, i;
   for(i = 1 ; i <=50 ; i++) {
      n -= 2;
      if(n <= 0)break;
   }
   return arr[i]+k;
}

main () {
   ios::sync_with_stdio(0);

   arr[1] = 30;
   stp[1] =  2;
   for(int i = 2 ;i <= 500; i++) {
      arr[i] = arr[i-1] + 3;
      stp[i] = stp[i-1] + 2;
   }

   int r, g, b, ans = 0;
   cin >> r >> g >> b;

   ans = max(ans,solve(0,r));
   ans = max(ans,solve(1,g));
   ans = max(ans,solve(2,b));

   cout << ans << endl;
}

#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
using namespace std;
int main()
{
    int a[4];
    while(scanf("%d%d%d",&a[0],&a[1],&a[2])!=EOF)
    {
        int g=0;
        int result;
        int max=0;
        int flag=0;//等于零表示没剩余，等于一表示有剩余
        for(int i=0;i<=2;i++)
        {
            g=a[i]/2;
            if(a[i]%2==0)
            {
                result=3*(g-1)+i;
            }
            else
            {
                result=3*g+i;
            }
            if(result>max)
            max=result;
        }
        printf("%d\n",max+30);
    }
    return 0;
}

#include <iostream>
using namespace std;
int a,b,c;
int main()
{
 cin>>a>>b>>c;
 cout<<27+max(++a/2*3,1+max(++b/2*3,++c/2*3+1));
}

#include<iostream>
//#include<conio.h>
using namespace std;

int main()
{
    int r,g,b;
    int a[3];
    cin>>a[0]>>a[1]>>a[2];
    int index = 0;
    int x = a[0];
    for(int i=0;i<2;i++){
            if(a[i+1]>=x){
                             index = i+1;
                             x = a[i+1];
                             }

            }
            //cout<<x<<endl;
            int d ;
            if(x%2==0){
                    d = x/2-1;
                       }
                       else{
                            d = x/2;
                            }

        // cout<<d<<endl;
          a[0] = a[0]-d*2;
          a[1] = a[1]-d*2;
          a[2] = a[2]-d*2;
          int y;
           for(int i=2;i>=0;i--){
                             if(a[i]>0){
                                        y = i;
                                        break;
                                        }
                             }
                        //    cout<<y<<endl;
           cout<<30+d*3+y<<endl;

  // getch();
    return 0;
    }

#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <map>
#include <utility>

using namespace std;

	void main()
{
	int R, G, B;

	cin >> R >> G >> B;

	R -= 2;

	int count = 0;

	while ( (R > 0)||( G > 0)||( B > 0) )
	{
		G -= 2;
		count ++;

		if ( (R > 0)||(B > 0)||( G > 0) )
		{
			B -= 2;
			count++;
		}
		if ( (R > 0)||(G > 0)||(B > 0) )
		{
			R -= 2;
			count ++;
		}
	}

	cout << count + 30;

}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int r,g,b;
    cin >> r >> g >> b;
    int ans=0;
    int t=0;
    int m,p;
    while(1)
    {
        r-=2;
        m = max(r,max(g,b));
        if(m<=0)
        {
            break;
        }

        t++;
        g-=2;
        m = max(r,max(g,b));
        if(m<=0)
        {
            break;
        }
        t++;

        b-=2;
        m = max(r,max(g,b));
        if(m<=0)
        {
            break;
        }
        t++;
    }

    cout << t+30 << '\n';
}

#include<iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <set>
using namespace std;

int main() {
	int r, g, b;
	cin >> r >> g >> b;
	if (r != 0 || g != 0 || b != 0) {

		r = r / 2 + r % 2;
		g = g / 2 + g % 2;
		b = b / 2 + b % 2;

		if (r > g && r > b)
		{
			cout << 29 + (r-1)*3+1;
		}
		if (g >= r && g > b)
		{
			cout << 29 + (g-1)* 3+2;
		}
		if (b >= r && b >=g )
		{
			cout << 29 + b * 3;
		}
	}
	else {
		cout << 0;
	}
}

/* i have a dream */
#include<bits/stdc++.h>
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;

template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#define trace(x) {cerr << #x << "=" << x <<endl;}
#define trace2(x, y) {cerr << #x << "=" << x << " " << #y << "=" << y <<endl;}
#define trace3(x, y,z) {cerr << #x << "=" << x << " " << #y << "=" << y <<" " << #z << "=" <<z<<endl;}
/*
template <typename T> ostream& operator<<(ostream& os, const vector<T> &p){os << "[ "; for (T x: p) os << x << " "; os << "]" << endl; return os;}
template <typename T> ostream& operator<<(ostream& os, const set<T> &p){os << "{ "; for (T x: p) os << x << " "; os << "}" << endl; return os;}
template <typename T> ostream& operator<<(ostream& os, const ordered_set<T> &p){os << "{ "; for (T x: p) os << x << " "; os << "}" << endl; return os;}
template <typename Tk, typename Tv> ostream& operator<<(ostream& os, const map<Tk, Tv> &p){os << "{ "; for (pair<Tk, Tv> x: p) os << x << " "; os << "}" << endl; return os;}
template <typename Tk, typename Tv> ostream& operator<<(ostream& os, const pair<Tk, Tv> &p){os << "{" << p.first << ',' << p.second << "}";return os;}
*/
#define pi pair<int,int>
#define pipi pair<int,pair<int,int> >
#define fi first
#define se second
#define mod 1000000007
#define ll long long
const int MAX=2e5+7;
#define inf 10000000000000000LL

int r,g,b;

int func()
{
    int ans=0;
    if(r!=0)
        ans=max(ans,3*((r-1)/2));
    if(g!=0)
        ans=max(ans,1+3*((g-1)/2));
    if(b!=0)
        ans=max(ans,2+3*((b-1)/2));
    return ans+30;
}

int main()
{
    ios_base::sync_with_stdio(false);
    //freopen("in.txt","r",stdin);
    cin>>r>>g>>b;
    cout<<func()<<endl;
    return 0;
}

#include <bits/stdc++.h>
#define endl "\n"
#define ll long long
using namespace std;
int main()
{   ios::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
    int a,b,c,x,y,z;
    cin>>a>>b>>c;
    if(a%2==0)
       x=a/2;
    else
       x=a/2+1;
    if(b%2==0)
       y=b/2;
    else
       y=b/2+1;
    if(c%2==0)
       z=c/2;
    else
       z=c/2+1;
    if(a==1)
       x=1;
    if(b==1)
       y=1;
    if(c==1)
       z=1;
    // cout<<x<<" "<<y<<" "<<z<<" "<<endl;
    if(x==y&&y==z)
    { x=x;y=y;z=z;}
    else if(z>=x&&z>=y)
     { x=z;y=z;}
    else if(y>=x&&y>=z)
    { x=y;z=y-1;}
    else if(x>=y&&x>=z)
    {y=x-1;z=x-1;}
  // cout<<x<<" "<<y<<" "<<z<<" ";
       cout<<30+x-1+y+z;

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
//Subprograme
bool vocala(char c){
 if(c=='a'||c=='A'||c=='e'||c=='E'||c=='i'||c=='I'||c=='o'||c=='O'||c=='u'||c=='U')
    return true;
 if(c=='y'||c=='Y')return true;
 return false;
}
int isprime(long long n)
{
    if (n <= 1)  return 0;
    if (n <= 3)  return 1;
    if (n%2 == 0 || n%3 == 0) return false;
    for (int i=5; i*i<=n; i=i+6)
        if (n%i == 0 || n%(i+2) == 0)
           return 0;
    return 1;
}
int isfibo(long long n){
long long a=5*n*n+4;
long long b=a-8;
if(sqrt(a)==int(sqrt(a))|| sqrt(b)==int(sqrt(b)))
    return 1;
return 0;
}
int gcd(long long a,long long b){
long long r;
while(b){
    r=a%b;
    a=b;
    b=r;
}
return a;
}
//End subprograme
ifstream in("cautbin.in");
ofstream out("cautbin.out");
#define opt1 ios_base::sync_with_stdio(0)
#define MOD 1000000007
#define lb lower_bound
#define up upper_bound
#define er equal_range
#define opt2 cin.tie(0)
#define opt3 cout.tie(0)
#define fi first
#define se second
#define save1 in.close()
#define save2 out.close()
#define mp make_pair
#define pb push_back
#define bs bitset
#define bpc __builtin_popcount
long long const nrmax=1e18;
typedef long long ll;
typedef unsigned long long int ull;
typedef vector<ull> vull;
typedef vector<vector<ull>> vvull;
typedef vector<pair<int,ull>> vpiull;
typedef vector<pair<ull,int>> vpulli;
typedef vector<pair<ll,ull>> vpllull;
typedef vector<pair<ull,ll>> vpullll;
typedef vector<pair<ull,ull>> vpullull;
typedef pair<ull,ull> pullull;
typedef string str;
typedef char chr;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;
typedef vector<vector<int>> vvi;
typedef vector<double> vd;
typedef vector<vector<double>> vvd;
typedef vector<string> vs;
typedef vector<vector<string>> vvs;
typedef pair<int,int> pii;
typedef pair<int,ll> pill;
typedef pair<ll,int> plli;
typedef pair<ll,ll> pllll;
typedef vector<pii> vpii;
typedef vector<vector<pii>> vvpii;
typedef vector<pill> vpill;
typedef vector<vector<pill>> vvpill;
typedef vector<plli> vplli;
typedef vector<vector<plli>> vvplli;
typedef vector<pllll> vpllll;
typedef vector<vector<pllll>> vvpllll;
typedef map<int,int> mii;
typedef map<int,ll> mill;
typedef map<ll,int> mlli;
typedef map<ll,ll> mllll;
typedef map<ll,chr> mllc;
typedef map<chr,int> mci;
typedef map<ll,str> mlls;
typedef map<str,int> msi;
typedef map<str,ll>msll;
typedef map<chr,ll>mcll;

int main()
{opt1;opt2;opt3;

   ll a,b,c;
   cin>>a>>b>>c;
   ll u=0;
   int train=1;
   while(a>0||b>0||c>0){
      if(train==1)a-=2;
      if(train==2)b-=2;
      if(train==3)c-=2;
      ++train;
      if(train==4)train=1;
      ++u;
   }
   cout<<u+29<<'\n';

#ifdef LOCAL_DEFINE;
        cerr<<"Time elapsed: "<<1.0*clock()/CLOCKS_PER_SEC<<" s.\n";
    #endif
save1;save2;
//http://m1.codeforces.com/enter
return 0;
}

// Exercício:
// Tempo para programar:
// Dificuldade:
// Tema:
// Complexidade: O( ? )

#include <iomanip>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <stack>
#include <list>

using namespace std;

typedef long long ll;

typedef vector<ll>vi;
typedef pair<ll,ll>ii;
typedef vector<ii>vii;

#define INF 0x3F3F3F3F
#define ler(x) scanf("%lld",&x);
#define imp(x) printf("%lld",x);
#define REP(n) for(ll i=0;i<n;++i)
#define PI 2*acos(0.0)
#define pb push_back
#define pq priority_queue
#define mp make_pair
#define MAXN 1001

int main()
{
	ll r,g,b;
	cin >> r >> g >> b;
	ll ans = 30+3*((r+1)/2-1);
	if(g) ans = max(ans,31+3*((g+1)/2-1));
	if(b) ans = max(ans,32+3*((b+1)/2-1));

	cout << ans << endl;
	return 0;
}

#include <cstdio>
#include <vector>
#include <algorithm>
#include <iostream>
#include <cmath>
#include <cstring>
#include <string>
#include <complex>
#include <map>
#include <set>
#include <queue>
using namespace std;

#define fo(i,n) for(int i=0; i<(int)(n); i++)
#define all(c) c.begin(), c.end()
#define pb push_back
#define mp make_pair
#define next(a,i) a[(i+1)%a.size()]
#define prev(a,i) a[(i-1+a.size())%a.size()]

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef complex<double> P;

int main(){
    int a=0, b=0, c=0; scanf("%d%d%d",&a,&b,&c);
    if (a) a = ((a-1)/2)*3;
    if (b) b = ((b-1)/2)*3+1;
    if (c) c = ((c-1)/2)*3+2;
    printf("%d\n",30+max(a,max(b,c)));
}

#include<iostream>
using namespace std;
int r,g,b;
int main()
{
    cin>>r>>g>>b;
    cout<<max((r/2+r%2-1)*3+1,max((g/2+g%2-1)*3+2,(b/2+b%2-1)*3+3))+29<<endl;
    return 0;
}

#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <iomanip>
#include <climits>
#include <string>

using namespace std;

int a[5];

int main() {
	ios_base::sync_with_stdio(false);

	cin >> a[0] >> a[1] >> a[2];
	int s = a[0] + a[1] + a[2];
	int ans = 0;
	int i = 0;
	while (s > 0) {
		s -= min(a[i], 2);
		a[i] -= min(a[i], 2);
		ans++;
		i = (i + 1) % 3;
	}

	cout << ans + 29 << endl;

	return 0;
}
/* Mon Feb 27 2017 18:46:14 GMT+0300 (RTZ 2 (зима)) */

/* Mon Feb 27 2017 18:48:25 GMT+0300 (RTZ 2 (зима)) */

/* Mon Feb 27 2017 18:49:25 GMT+0300 (RTZ 2 (зима)) */

#include<bits/stdc++.h>
#define ll long long int
#define ld long double
#define llu unsigned long long int
#define scll(x) scanf("%lld",&x)
#define scld(x) scanf("%lf",&x)
#define scull(x) scanf("%llu",&x)
#define scch(x) scanf(" %c",&ch)
#define Pi acos(-1.0)
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
ll __xor(ll a,ll b){return a^b;}
ll __and(ll a,ll b){return a&b;}
ll __or(ll a,ll b){return a|b;}
using namespace std;
int main()
{
         #ifndef ONLINE_JUDGE
         freopen("input_cf.txt","r",stdin);
         freopen("output_cf.txt","w",stdout);
         #endif
         ll b,c=0,x,y,z,t,i,j,k,l1,l2,l3,m,n,c1=0,c2=0,q,c3=0;
        ll a[3];
for(i=0;i<3;i++)
   scll(a[i]);
        c+=30;
        if(a[0]>2)
        a[0]=a[0]-2;
          else
             a[0]=0;
             c1++;
        while(1)
        {
                if(a[0]==0&&a[1]==0&&a[2]==0)
                        break;
                  if(a[0]>=0&&c1==0)
                  {
                        if(a[0]>2)
                                a[0]=a[0]-2;
                              else
                                a[0]=0;
                  c1++;
                  c++;
                  }
                   else if(a[1]>=0&&c1==1)
                  {
                          if(a[1]>2)
                        a[1]=a[1]-2;
                     else
                        a[1]=0;
                     c++;
                    c1++;
            }
            else if(a[2]>=0&&c1==2)
            {

                        if(a[2]>2)
                        a[2]=a[2]-2;
                else
                        a[2]=0;
                  c++;
                c1=0;
            }
if(a[0]==0&&a[1]==0&&a[2]==0)
        break;

        }
        cout<<c;
 return 0;
}

#include <stdio.h>
#include <string>
#include <sstream>
#include <vector>
#include <algorithm>
#include <utility>
#include <math.h>

using namespace std;

//#define ss stringstream
#define sz size()
#define pb push_back
#define mp make_pair

#define FOR(i,n) SFOR(i,0,n)
#define SFOR(i,m,n) for(i=m;i<n;i++)
#define FORD(i,n) for(i=n-1;i>=0;i--)

vector <int> a;
vector <pair <int, int> > b;
int main()
{
	int i,j,n,a,b,c;
	scanf("%d%d%d", &a, &b, &c);
	int res = 30;
	a= (a-1)/2;b= (b-1)/2;c= (c-1)/2;
	if ((a>b)&&(a>c))
		res = 30+3*a;
	else if ((b>=a) &&(b>c))
		res = 31 +3*b;
	else if ((c>=b) && (c>=a))
		res = 32 +3*c;
	printf("%d", res);
}

#include<stdio.h>
main()
{
	int r,g,b;
	int max=0;
	scanf("%d %d %d",&r,&g,&b);
	int t=0;
if(b>=r && b>=g)
max=b;
else
if(g>=r && g>=b)
max=g;
else max=r;
t=((max+1)/2);
t=t*3;
if(max==b)
printf("%d",t+29);
else
if(max==g)
printf("%d",t+28);
else
if(max==r)
printf("%d",t+27);
}

#include<iostream>
using namespace std;
int main()
{
	int r,g,b;
	int ans=29;
	cin>>r>>g>>b;

	while(1)
	{
		if(r<=0&&g<=0&&b<=0)
			break;

		if(r>0&&g<=0&&b<=0)
		{
			ans+=1;
			r-=2; continue;
		}
		if(g>0&&b<=0)
		{
			ans+=2; r-=2;
			g-=2;
			continue;
		}
		if(b>0)
		{
			ans+=3;r-=2; g-=2;
			b-=2;
		}
	}
    cout<<ans<<endl;
	return 0;
}

#include<bits/stdc++.h>

using namespace std;

int r, b, g, ans, A;

int main ()
{
    cin >> r >> g >> b;
    if(b == max(r, max(g, b)))
        A = 2;
    else if(g == max(r, max(g, b)))
        A = 1;
    else A = 0;
    cout << (int(max(r, max(g, b)) / 2) + (max(r, max(g, b)) % 2) - 1) * 3 + 30 + A;
return 0;
}

# define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <stdio.h>
#include <vector>
#include <cstdlib>
#include <string>
#include <map>
#include <ctime>
#include <list>
#include <stack>
#include <set>
#include <memory.h>
#include <deque>
#include <queue>
#include <cctype>
#include <iomanip>
#include <bitset>
#include <sstream>
typedef long long ll;
typedef long double ld;
using namespace std;

# define pi 2*acos(0.)
# define e exp(1.)
# define N 200100
ll b[N];
int main() {
	int r, g, b;
	scanf("%d%d%d", &r, &g, &b);
	int ans = 0;
	int i = 1;
	if (r || g || b)ans = 30;
	while (1)
	{
		if (r <= 0 && g <= 0 && b <= 0)
			break;

		if (i > 1)ans++;
		if (i == 1)
		{
			if(r>0)r -= 2;

		}

		if (i == 2 )
			if(g>0)g -= 2;
		if (i == 3)
		{
			i = 0;
			if (b > 0)b -= 2;
		}

		i++;

	}

	printf("%d\n", ans + 1);
}

#include<iostream>
using namespace std;
int main()
{
    int a[3] , res = 29;
    cin >> a[0] >> a[1] >> a[2];
    while( a[0] && a[1] && a[2] ){
        for(int i = 0 ; i < 3 ; i++)
            if( a[i] > 2 )
                res++, a[i] -= 2;
            else if( a[i] == 1 ) res++ , a[i] = 0;
    }
    cout << res << endl;
}

#include <iostream>
using namespace std;

int main(int argc, char *argv[]) {
	int r,g,b;
	cin>>r>>g>>b;
	int maxi,maxicol;
	if(r>(g+1) && r>(b+2)){
		maxicol = 1;
		maxi = r;
	}
	else if(g>(b+1)){
		maxicol = 2;
		maxi = g;
	}
	else {
		maxicol = 3;
		maxi = b;
	}
	int div = (maxi/2)-1;
	int rest = maxi%2;
	switch(maxicol){
	case 1:
		if (rest==0)
			cout<<30+div*3;
		else
			cout<<30+div*3+3;
		break;
	case 2:
		if (rest==0)
			cout<<31+div*3;
		else
			cout<<31+div*3+3;
		break;
	case 3:
		if (rest==0)
			cout<<32+div*3;
		else
			cout<<32+div*3+3;
		break;
	}
	return 0;
}

#include <cstdio>
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
    int r,g,b,res;
  //  freopen("/home/nextgen/project/in.txt","r",stdin);
    cin >> r >> g >> b;
    if (b>=max(r,g)) {
        res=b/2;
        if (b%2>0) res++;
        res=(res-1)*3+32;
        cout << res;
        return 0;
    }
    if (g>=max(r,b)) {
        res=g/2;
        if (g%2>0) res++;
        res=(res-1)*3+31;
        cout << res;
        return 0;
    }
    res=r/2;
    if (r%2>0) res++;
    res=(res-1)*3+30;
    cout << res;
    return 0;
}

#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;

#define FOR(i,a,b) for(int i=a;i<b;i++)
#define REP(i,n) FOR(i,0,n)
#define pb push_back
#define sz size()
#define INF (int)1e9

typedef long long LL;
typedef vector<int> VI;
typedef vector<string> VS;
typedef vector< vector <int> > VVI;
typedef pair<int,int> pii;

void wait() { getchar(); getchar(); }

int main() {
  int r,g,b;
  cin>>r>>g>>b;
  int cnt=0;
  VI a; a.pb(r); a.pb(g); a.pb(b);
  int m=-1,pos;
  REP(i,a.sz) {
     if(a[i]>=m) {
        m=a[i];
        pos=i;
     }
  }

cout<<(m/2)*3+pos+30;
wait();
}

#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int a,b,c;
	scanf("%d%d%d",&a,&b,&c);
	int x=(a+1)/2,y=(b+1)/2,z=(c+1)/2;
	if(x>=y&&x>=z) printf("%d",30+(x-1)*3);
	else if(y>=x&&y>=z) printf("%d",31+(y-1)*3);
	else printf("%d",32+(z-1)*3);
	return 0;
}

#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>

using namespace std;

int main()
{
   // freopen("input.txt", "r", stdin);
   // freopen("output.txt", "w", stdout);
    int r, g, b;
    cin >> r >> g >> b;
    int time = 0;
    while (r > 0 && g > 0 && b > 0) {
        int color = time % 3;
        if (color == 0 && r>0) {
            r -= 2;
            time++;
        }
        else if (color == 1 && g>0) {
            g -= 2;
            time++;
        }
        else if (b>0) {
            b -= 2;
            time++;
        }
    }
    cout << time + 30;
    cin >> r;
}

#include <bits/stdc++.h>

using namespace std;

int maxi(int, int, int);

int main()
{
    short r, g, b, time = 30;
    cin >> r >> g >> b;
    int max_val = maxi(r, g, b);
    int loop = ceil(max_val / 2.0);
    if (r == max_val && g == max_val && b == max_val)
        cout << 32 + 3*(loop-1);
    else if (g == max_val && b == max_val)
        cout << 32 + 3*(loop-1);
    else if (r == max_val && b == max_val)
        cout << 32 + 3*(loop-1);
    else if (r == max_val && g == max_val)
        cout << 31 + 3*(loop-1);
    else if (b == max_val)
        cout << 32 + 3*(loop-1);
    else if (g == max_val)
        cout << 31 + 3*(loop-1);
    else if (r == max_val)
        cout << 30 + 3*(loop-1);
    return 0;
}

int maxi(int a, int b, int c)
{
    if (a > b)
    {
        if (a > c)
            return a;
        else
            return c;
    }
    else
    {
        if (b > c)
            return b;
        else
            return c;
    }
}

#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>

using namespace std;

int main()
{
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    int r, g, b;
    cin >> r >> g >> b;
    int time = 0;
    while (r > 0 || g > 0 || b > 0) {
        int color = time % 3;
        if (color == 0 && r>0) {
            r -= 2;
        }
        else if (color == 1 && g>0) {
            g -= 2;
        }
        else if (b>0) {
            b -= 2;
        }
        time++;
    }
    cout << time + 30 - 1;
    cin >> r;
}

// Thu Dec 01 2016 19:49:23 GMT+0300 (MSK)

#include <iostream>

using namespace std;

int main()
{
    int sr,sg,sb;
    cin>>sr>>sg>>sb;
    int tim=30,dsg=0,dsb=0;
    if (sr>0)
    {
        sr=sr-2;
    }
    if (sg>0)
    {
        sg=sg-2;
       tim++;
       dsg=1;
    }
    if (sb>0)
    {
        sb=sb-2;
        if (dsg==0)
            tim=tim+2;
        else
        tim++;
        dsb=1;
    }
    if (dsb==0 && sr>0)
        tim++;
    if (dsb==0 && dsg==0 && sr>0)
        tim=tim++;
   // else if (dsb==0 && dsg==0)
    //    tim=tim+2;
    //cout<<tim<<endl;
    while (true)
    {
        if (sr<=0 && sg<=0 && sb<=0)
            break;
        tim++;
        if (sr>0)
        {
            sr=sr-2;
        }
        if (sr<=0 && sg<=0 && sb<=0)
            break;
        tim++;
        if (sg>0)
        {
            sg=sg-2;
        }
        if (sr<=0 && sg<=0 && sb<=0)
            break;
        tim++;
        if (sb>0)
        {
            sb=sb-2;
        }
        if (sr<=0 && sg<=0 && sb<=0)
            break;
    }
    cout<<tim<<endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
void solve()
{
    int r,g,b;
    int k,l=0,mx,sum=30;
    cin>>r>>g>>b;
    if(b>=g)
    {
        mx=b;
        k=2;
    }
    else
    {
        mx=g;
        k=1;
    }
    if(mx<r)
    {
        mx=r;
        k=0;
    }
    l=(mx+1)/2;
    cout<<(l+sum+k+1);
}
int main()
{
    solve();
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

template <class T> int size(const T &x) {return x.size();}
template <class T> T mod(T a, T b) { return (b + (a % b)) % b;}

#define F first
#define S second
#define PB push_back
#define endl '\n'
#define rep(i, a, b) for(__typeof(a) i=a; i<(b); i++)
#define iter(it, c) for(__typeof((c).begin()) it=(c).begin(); \
 it != (c).end(); it++)

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<vi> vvi;
typedef set<int> si;

const int INF = ~(1 << 31);
const double EPS = 1e-9;
const double PI = acos(-1);

int main() {
    int a, b, c;
    cin >> a >> b >> c;

    a  = (a % 2 != 0 ? 1 : 0) + (a / 2);
    b  = (b % 2 != 0 ? 1 : 0) + (b / 2);
    c  = (c % 2 != 0 ? 1 : 0) + (c / 2);

    a--; b--; c--;
    a *= 3;
    b *= 3; b++;
    c *= 2; c += 2;

    cout << max(a, max(b, c)) + 30 << endl;

    return 0;
}

#include<iostream>
using namespace std;
int a[4],t,z,x,ans;
int main(){
    cin>>a[1]>>a[2]>>a[3];
    z=a[1]+a[2]+a[3];
    for(int j=1;j<=ans;j++){
        for(int i=1;i<=3;i++){
            x=i;
            if(a[i]>=2){
                a[i]-=2;
                z-=2;
                ans++;
            }else{
                z-=a[i];
                a[i]=0;
                ans++;
            }if(z==0)break;
        }
        if(z==0)break;
    }cout<<ans+29<<endl;
    return 0;
}

#include<iostream>
#include<math.h>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
using namespace std;

int main()
{
    int r,g,b,n,a[3];
    for(int i=0;i<3;i++)
    {
        scanf("%d",&n);
        if(n%2==0)
            a[i]=n/2;
        else
            a[i]=n/2+1;
        //printf("%d\n",a[i]);
    }
    int m=0,max=a[0];
    for(int i=1;i<3;i++)
    {
        if(a[i]>=max)
        {
            max=a[i];
            m=i;
        }
    }
    sort(a,a+3);
    if(a[1]==max)
        printf("%d\n",3*a[1]-1+30);
    else
        printf("%d\n",3*(a[2]-1)+m+30);
    //cout<<3*a[1]+m+30<<endl;
}

#include<iostream>
#include<cstdio>
#include<string>
using namespace std;
int a,b,c;
int main()
{
while(scanf("%d%d%d",&a,&b,&c)==3)
{
int ans=30;
int d=0;
if(a>b && a>c)
{
ans+=(a/2-1)*3+(a%2)*3;
}
else if(b>a && b>c)
{
ans+=(b/2-1)*3+(b%2)*3+1;
}
else if(c>=a && c>=b)
{
ans+=(c/2-1)*3+(c%2)+2;
}
printf("%d\n",ans);
} //  system("pause");
 return 0;
  }

#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>

#define ll          long long
#define pb          push_back
#define mp          make_pair
#define pii         pair<int,int>
#define vi          vector<int>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (int)x.size()
#define hell        1000000007
#define endl        '\n'
#define rep(i,a,b)	for(int i=a;i<b;i++)
using namespace std;
vi v[1000007];
void solve(){
	int n;
	cin>>n;
	int b[n];
	rep(i,0,n){
	cin>>b[i];v[b[i]].pb(i);}
	if(n==1)
	cout<<1<<endl;
	else if(n==2)cout<<2<<endl;
	else
	{
		int max_p = 2;
		for(int i=0;i<n-2;i++)
		{
			for(int j=i+1;j<n-1;j++)
			{
				if(b[i]==b[j])
				{
					max_p = max(max_p,int(v[b[i]].size()));
					continue;
				}
				int p = 2;
				int r =0 ,t =0;
				while(v[b[i]][r]!=i)
				r++;
				while(v[b[j]][t]!=j)
				t++;
				while(r<v[b[i]].size()&&t<v[b[j]].size())
				{
					if(p%2==0)
					{
						while(r<v[b[i]].size()&&v[b[i]][r]<v[b[j]][t])
						{
							r++;
						}
						if(r!=v[b[i]].size())
						p++;
					}
					else
					{
							while(t<v[b[j]].size()&&v[b[j]][t]<v[b[i]][r])
						{
							t++;
						}
						if(t!=v[b[j]].size())
						p++;

					}
					//cout<<p<<" "<<r<<" "<<t<<endl;
				}
				//cout<<p<<" "<<i<<" "<<j<<" "<<r<<" "<<t<<endl;
				//cout<<v[b[i]].size()<<endl;
				if(p%2==0&&r!=v[b[i]].size())
				p++;
				else if(p%2==1){
					if(t!=v[b[j]].size())
					p++;
				}
				//cout<<p<<" "<<i<<" "<<j<<endl;
				max_p = max(p,max_p);
			}
		}
		cout<<max_p<<endl;
	}

}

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int t=1;
//	cin>>t;
	while(t--){
		solve();
	}
	return 0;
}

#include <cstdio>
#include <cstring>
#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <sstream>
#include <set>
#define X first
#define Y second
using namespace std;

typedef pair<long long,long long> pll;
typedef pair<int,int> pii;
typedef pair<long long,pii> gao;

int main()
{
  int r,g,b,minn,mini;
  scanf("%d%d%d",&r,&g,&b);
  minn = (r - 1 ) / 2;
  mini = 0;
  if (minn <= (g-1)/2){
    minn = (g-1)/2;
    mini = 1;
  }
  b /= 2;
  if (minn <= (b-1)/2){
    minn = (b-1)/2;
    mini = 2;
  }
  printf("%d\n",30 + 3 * minn + mini);
}

#include <iostream>
#include <cstring>
#include <cstdio>
#include <algorithm>

using namespace std;
int max(int a,int b,int c){
    if(a>=b&&a>=c)
        return a;
    else if(b >= a&&b>=c)
        return b;
    else
        return c;
}

int main(){
    int r,g,b;
    while(scanf("%d%d%d",&r,&g,&b)!=EOF){
        int end  = 29;
        int n ;
        int m = max(r,g,b);
        if(m & 1)
           n = m/2;
        else
            n = m/2 - 1;
        end += (n*3);
        if(b - 2*n > 0&&n!=0)  end+=3;
        else if(g - 2*n > 0&&n!=0) end += 2;
        else  if(r - 2*n > 0&&n!=0) end += 1;
        printf("%d\n",end);
    }
    return 0;
}

#include <iostream>
#include <cmath>
using namespace std;
int main() {
	long long a,b,c;
	cin>>a>>b>>c;
	long long div;
	long long max=c;
	if(b>max){max=b;
	}
	if(a>max){max=a;
	}
	int l;
	if(max==c){l=2;
	}
	if(max==b){l=1;
	}
	if(max==a){l=0;
	}
	long long n=30+(3*(((max+1)/2)-1))+l;
	cout<<n;
	return 0;
}

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>

using namespace std;

int main()
{
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	int r, g, b;

	cin >> r >> g >> b;

	int ans = 0;

	int t = 0;

	if(r + g + b == 0)
	{
		cout << 0;
		return 0;
	}

	bool r1 = false, b1 = false, g1 = false;

	while(r > 0 || b > 0 || g > 0)
	{
		if(r > 0 && t%3 == 0)
		{
			r -= 2;
			r1 = true;
		}
		else if(g > 0 && t%3 == 1)
		{
			g -= 2;
			g1 = true;
		}
		else if(b > 0)
		{
			b -= 2;
			b1 = true;
		}
		t++;
	}

	cout << max(30, t + 29);

	return 0;
}

// In the name of Aadi Shakti
// We are nothing and you are everything
// Jai Mata Di

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define fast ios_base::sync_with_stdio(false) ; cin.tie(0) ; cout.tie(0) ;
#define endl '\n'
#define sz(v)	( (int) ( (v).size() ) )
#define all(v)	( (v).begin() ) , ( (v).end() )
#define allr(v)	( (v).rbegin() ) , ((v).rend())
#define mod 1e9 + 7

void solve() {
        int r , g , b ;
        cin >> r >> g >> b ;
        int arr[] = {r , g, b} ;
        sort(arr , arr + 3) ;
        int turn = 0 ;
        int maxx = arr[2] ;
        if (arr[0] == arr[2]) {
                if (maxx % 2 == 0) {
                        turn = ( maxx / 2 ) * 3 ;
                }
                else {
                        turn = ( ( maxx / 2 ) + 1 ) * 3 ;
                }
                cout << turn + 29 << endl ;
        }
        else {
                bool red = false , green = false , blue = false ;
                if (r == maxx) red = true ;
                if (g == maxx) green = true ;
                if (b == maxx) blue = true ;
                if (red && green == false && blue == false) {
                        turn += ( ( (r - 1) / 2 ) + 1 ) ;
                        turn += ( ( (g - 1) / 2 ) + 1 ) ;
                        turn += ( ( (b - 1) / 2 ) + 1 ) ;
                        turn += 29 ;
                        cout << turn << endl ;
                }
                else if (red == false && green && blue == false) {
                        turn += ( ( (g - 1) / 2 ) + 1 ) ;
                        turn += ( ( (g - 1) / 2 ) + 1 ) ;
                        turn += ( ( (b - 1) / 2 ) + 1 ) ;
                        turn += 29 ;
                        cout << turn << endl ;
                }
                else if (red == false && green == false && blue ) {
                        turn += ( ( (b - 1) / 2 ) + 1 ) ;
                        turn += ( ( (b - 1) / 2 ) + 1 ) ;
                        turn += ( ( (b - 1) / 2 ) + 1 ) ;
                        turn += 29 ;
                        cout << turn << endl ;
                }
                else if (red && green && blue == false) {
                        turn += ( ( (g - 1) / 2 ) + 1 ) ;
                        turn += ( ( (g - 1) / 2 ) + 1 ) ;
                        turn += ( ( (b - 1) / 2 ) + 1 ) ;
                        cout << turn << endl ;
                }
                else if (red && blue && green == false ) {
                        turn += ( ( (b - 1) / 2 ) + 1 ) ;
                        turn += ( ( (b - 1) / 2 ) + 1 ) ;
                        turn += ( ( (b - 1) / 2 ) + 1 ) ;
                        turn += 29 ;
                        cout << turn << endl ;
                }
                else if (red == false && blue && green) {
                        turn += ( ( (b - 1) / 2 ) + 1 ) ;
                        turn += ( ( (b - 1) / 2 ) + 1 ) ;
                        turn += ( ( (b - 1) / 2 ) + 1 ) ;
                        turn += 29 ;
                        cout << turn << endl ;
                }
        }
}

int32_t main()
{
        #ifndef ONLINE_JUDGE
	        freopen("input.txt", "r", stdin);
	        freopen("output.txt", "w", stdout);
        #endif
        fast ;
        int testcases = 1 ;
        // cin >> testcases ;
        while(testcases--)
        {
                solve() ;
        }
        return 0;
}
/*  CODED BY:-
         ___________________________________
        |                       ___         |
        |  /\   /\  \ /  |  |  |___   |__|  |
        | /~~\ /~~\  |   |__|   ___|  |  |  |
        |___________________________________|
*/

#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <math.h>
#include <algorithm>

using namespace std;
int main()
{
    ios::sync_with_stdio(false);
//    cin.tie(0);

   int x,y,z; cin>>x>>y>>z;
   int i;
    for ( i = 0; ; i+=2) {
        if(x<=0 && y<=0 && z<=0)
            break;
//        if (i%2 == 0)
            y-=2;
//        else if (i%3 == 0)
            z-=2;
//        else
        x-=2;
    }
    cout<<(i)+30;

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main(){
	int a[3],ans=0;
	cin>>a[0]>>a[1]>>a[2];
	for(int i=0;i<3;i++)ans=max(ans,30+a[i]/2*3+a[i]%2+i-1);
	printf("%d",ans);
	return 0;
}

#include<iostream>
using namespace std;
int a,c,x,t1,t2,t3,t4,n,r,b,g;
int main()
{
cin>>r>>b>>g;
if(r>b>g)a=r/2+(b+1)/2+(g+1)/2;
else a=(r+1)/2+(b+1)/2+(g+1)/2;
a=a+30;
cout<<a;
}

#include <iostream>
#include <math.h>
using namespace std;
int main() {

    int r,g,b;
    cin>>r>>g>>b;

    if(r>g && r>b) {
        cout<<29+(r+1)/2*3-2;
    } else if(g>=r && g>b) {
        cout<<29+(g+1)/2*3-1;
    } else {
        cout<<29+(b+1)/2*3;
    }

    return 0;
}

#include <iostream>
#include <algorithm>
#include <map>
#include <bitset>
#include <set>
#include <vector>
#include <queue>
#include <deque>
#include <stack>
#include <string>
#include <cstring>
#include <string.h>
#include <iomanip>
#include <stdio.h>
#include <sstream>
#include <stdlib.h>
#include <functional>
#include <locale>
#include <cmath>
#include <math.h>

using namespace std;

#define ll  long long
#define ld long double
#define OO 100000000000000000
#define PI 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844
#define fast ios_base::sync_with_stdio(0);cin.tie(0);
#define _CRT_SECURE_NO_WARNINGS
//ll arr[4];
//char op[3];
//ll calc(ll number1, ll number2, char operation)
//{
//	return (operation == '*') ? number1*number2 : number1 + number2;
//}
//ll solve()
//{
//	ll result1 = 0,result2=0,result3=0,result4=0,result5=0,result6=0;
//
//	result1 += calc(arr[0], arr[1], op[0]);
//	result1 += calc(result1, arr[2], op[1]);
//	result1 += calc(result1, arr[3], op[2]);
//
//	result1 += calc(arr[0], arr[1], op[0]);
//	result1 += calc(result1, arr[2], op[1]);
//	result1 += calc(result1, arr[3], op[2]);
//
//	result1 += calc(arr[0], arr[1], op[0]);
//	result1 += calc(result1, arr[2], op[1]);
//	result1 += calc(result1, arr[3], op[2]);
//
//	result1 += calc(arr[0], arr[1], op[0]);
//	result1 += calc(result1, arr[2], op[1]);
//	result1 += calc(result1, arr[3], op[2]);
//
//	result1 += calc(arr[0], arr[1], op[0]);
//	result1 += calc(result1, arr[2], op[1]);
//	result1 += calc(result1, arr[3], op[2]);
//
//	result1 += calc(arr[0], arr[1], op[0]);
//	result1 += calc(result1, arr[2], op[1]);
//	result1 += calc(result1, arr[3], op[2]);
//
//	return min(min(result6,min(result1,result2)),min(result5,min(result3,result4)));
//}
//int main()
//{
//	ll answer = OO;
//	cin >> arr[0] >> arr[1] >> arr[2] >> arr[3];
////	cin >> op[0] >> op[1] >> op[2];
////	sort(arr, arr + 4);
////	do
////	{
////		do
////		{
////			answer = min(solve(), answer);
////		} while (next_permutation(arr, arr + 4));
////	} while (next_permutation(op, op + 3));
////	cout << answer << endl;
////	return 0;
////}
//
//int main()
//{
//	ll n, m, k, result1, result2, x1, x2;
//	cin >> n >> k >> m;
//	cin >> x1;
//	for (int i = 0; i < n - 1; i++)
//	{
//		cin >> x2;
//		if (i % 2 == 1 && x2<x1)
//			x1 = x2;
//	}
//	if (n % 2 == 0)
//	{
//		cout << 0 << endl;
//		return 0;
//	}
//	result1 = x1;
//	result2 = m*(k / ((n + 1) / 2));
//	cout << min(result1, result2);
//	return 0;
//}
ll power(ll n)
{
	ll result = 1;
	for (int i = 0; i < n; i++)
		result *= 3;
	return result;
}
int main()
{

	ll arr[3];
	pair<ld, short>Max;
	for (int i = 0; i < 3; i++)
	{
		cin >> arr[i];
		if (arr[i] > Max.first)
			Max = { arr[i],i };
	}
	cout << power(ceil(Max.first / 2.0) - 1) + 30+Max.second << endl;;
	return 0;
}

#define _CRT_SECURE_NO_WARNINGS
#pragma comment(linker, "/STACK:64000000")
#define _USE_MATH_DEFINES
#include<iostream>
#include<vector>
#include<string>
#include<stack>
#include<algorithm>
#include<cmath>
#include<set>
#include<queue>
#include<sstream>
#include<utility>
#include<map>

using std::pair;
using std::stringstream;
using std::next_permutation;
using std::sqrt;
using std::priority_queue;
using std::sort;
using std::stack;
using std::string;
using std::vector;
using std::cin;
using std::cout;
using std::endl;
using std::min;
using std::max;
using std::set;
using std::swap;
using std::random_shuffle;
using std::queue;
using std::sin;
using std::cos;
using std::make_pair;
using std::cos;
using std::cerr;
using std::map;

typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
const long double PI = 3.14159265358979323846;
const double eps = 1e-12;

int main() {
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	int r, g, b;
	cin >> r >> g >> b;
	int res = 0;
	res = max((r - 1) / 2 * 3, res);
	res = max(1 + (g - 1) / 2 * 3, res);
	res = max(2 + (b - 1) / 2 * 3, res);
	cout << res + 30 << endl;
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int r,g,b,ans;
    cin>>r>>g>>b;
    if(r>=b){
        if(r>=g){
            if(r%2==0)
                ans=r/2;
            else
                ans=r/2+1;
            cout<<30+(ans-1)*3;
        }
         else{
            if(g%2==0)
                ans=g/2;
            else
                ans=g/2+1;
            cout<<31+(ans-1)*3;
         }

    }
    else{
        if(g>=b){
            if(g%2==0)
                ans=g/2;
            else
                ans=g/2+1;
            cout<<31+(ans-1)*3;
        }
         else{
            if(b%2==0)
                ans=b/2;
            else
                ans=b/2+1;
            cout<<32+(ans-1)*3;
         }
    }
    return 0;
}

#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;

int main() {
	int r,g,b;
	cin>>r>>g>>b;
	int max=r;
	int T=0;
	int flag=0;
	if(r) {
		T=(r-1)/2;
		if(r%2)
			flag=0;
	}
	if(g && g>=max) {
		T=(g-1)/2;
		if(g%2)
			flag=1;
	}
	if(b && b>=max) {
		T=(b-1)/2;
		if(b%2)
			flag=2;
	}
	cout<<30+3*T+flag<<endl;
	return 0;
}

#include <iostream>
using namespace std;

int main()
{
    int r,g,b,sum=30;

    cin>>r>>g>>b;

    while(true)
    {

   if(r>0)
   {
       r=r-2;
   }

      sum++;
      if(r<=0 && g<=0 && b<=0)
        {
            break;
        }
    if(g>0)
   {
       g=g-2;
   }

   sum++;
    if(b>0)
   {
       b=b-2;
   }
if(r<=0 && g<=0 && b<=0)
        {
            break;
        }

    }

    cout<<sum<<endl;

   return 0;
}

#include <iostream>
#include <cmath>
#include <complex>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <iomanip>
#include <functional>
#include <iterator>
#include <numeric>
#include <queue>

const double PI(acos(-1.0));
const double PI_2 = PI * 2.0;
double eps = 1e-9;

#define pb push_back
#define mp(a,b) make_pair(a,b)
#define all(x) x.begin(), x.end()
#define sqr(x) ((x)*(x))
#define F first
#define S second
#define inf (ll)(1e9+7)
#define infll (ll)(1e18+3)
#define sz(x) ((ll)x.size())
#define bits(x) __builtin_popcount(x)
#define bitsl(x) __builtin_popcountll(x)
#define rep(i, a, b) for (ll (i) = (a); i <= (b); ++(i))
#define forn(i, n) rep(i, 0, ((ll)n)-1)
#define INF 200000
#define rz resize

using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
typedef vector < ll > vll;
typedef vector<ll> vi;
typedef pair < ll, ll > pll;
typedef pair < ll, ll > pii;
typedef vector<vi> vii;
typedef vector<vi> vvi;
typedef vector<ull> vull;
typedef vector<pll> vpll;

int main() {
    ios_base::sync_with_stdio(false);
//    freopen("input.txt", "r", stdin);
    int n, m, k;
    cin >> n >> m >> k;
    if (n%2 == 0) {
        cout << 0; return 0;
    }

    int mi = inf;
    forn(i, n) {
        int t;
        cin >> t;
        if (i%2 == 0) mi = min(mi, t);
    }
    cout << min(mi, k*m/(n/2+1));
    return 0;
}

// Thu Dec 01 2016 20:47:22 GMT+0300 (MSK)

#include<iostream>
#include<vector>
#include<math.h>
#include<string>
#include<set>
#include<deque>
#include<stack>
#include<algorithm>
#include<queue>
#include<map>
#include<cstdio>
using namespace std;
int main()
{
int r,g,b,r1,g1,b1;

cin>>r>>g>>b;
int ans;

if(r%2==0)r1=r/2;
else r1=(r+1)/2;

if(g%2==0)g1=g/2;
else g1=(g+1)/2;

if(b%2==0)b1=b/2;
else b1=(b+1)/2;

if(b1>=r1 && b1>=g1)
{
ans=(3*(b/2))+2;

}

else if(g1>=r1 && g1>=b1)
{
ans=(3*(g/2))+1;

}
else
{

  ans=(3*(r/2));

}

cout<<ans+30<<"\n";

return 0;
}

#include<bits/stdc++.h>
#include<random>
#define int long long
#define pp pair<int,int>
#define ss second
#define ff first
#define pb push_back
#define mod 1000000007
using namespace std;
void fastio()
{

  #ifndef ONLINE_JUDGE
  freopen("INPUT.txt","r",stdin);
  freopen("OUTPUT.txt","w",stdout);
  #endif
     ios_base :: sync_with_stdio(false);
     cin.tie(NULL) ;
      cout.tie(NULL);
   }

signed main()  {
        fastio();
         int t=1;
          // cin>>t;
           while(t--)
              {
                    int a,b,c;
                    cin>>a>>b>>c;

                    int ans=30+(a/2+(a&1)-1)*3;

                    if(max({a,b,c})==b)
                    ans=31+(b/2+(b&1)-1)*3 ;

                    if(max({a,b,c})==c)
                    ans=32+(c/2+(c&1)-1)*3;

                    cout<<ans;
               }

    }

#include<iostream>
#include<algorithm>
#include<cmath>

using namespace std;

int main()
{
	int r, g, b;
	cin >> r >> g >> b;

	cout << max(30+3*(max(0.0,ceil((r-2)/2.0))), max( 31+3*(max(0.0,ceil((g-2)/2.0))), 31+3*(max(0.0,ceil((b-2)/2.0))))) << endl;
}

#include <bits/stdc++.h>
using namespace std;

int main() {
   int r, g, b;
   cin >> r >> g >> b;
   if(r + g + b > 0)
   cout << 30 + ((g / 2)+(g % 2)) + ((b / 2)+(b % 2)) * 2;
   else{
       cout << 0;
   }
}

#include <iostream>
using namespace std;
int r,b,g,t=0,s=30,x,q,w;
int main(){
  cin>>r>>g>>b;
   if(r>0)t=t+30;
    while(r>2){r=r%2;t=t+1;}
  if(r<=2)
    while(g>2){g=g%2;t=t+2;}
  if(g<=2)t=t+1;
   while(b>2){b=b%2;t=t+1;}
  if(b<=2)t=t+9;
  cout<<t;
}

#include <iostream>
#include <math.h>
using namespace std;
int main() {

    float r,g,b;
    cin>>r>>g>>b;

    r>2 ? cout<<29+ceil(r/2)+ceil(g/2)+ceil(b/2) : cout<<30+ceil(r/2)+ceil(g/2)+ceil(b/2);

    return 0;
}

#include<iostream>
using namespace std;
int main()
{
	int r,g,b;
	int ans=29;
	cin>>r>>g>>b;

	while(1)
	{
		if(r<=0&&g<=0&&b<=0)
			break;

		if(r>0&&g<=0&&b<=0)
		{
			ans+=1;
			r-=2; continue;
		}
		if(g>0&&b<=0)
		{
			ans+=2; r-=2;
			g-=2;
			continue;
		}
		if(b>0)
		{
			ans+=3;r-=2; g-=2;
			b-=2;
		}
	}
    cout<<ans<<endl;
	return 0;
}

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
void solve()
{
    int r,g,b,c;
    cin>>r>>g>>b;
    c=max(r,max(g,b));
    if(c==r){
        if(c%2==0) c=c/2;
        else c=(c/2)+1;
        cout<<((c-1)*3)+30<<endl;return;
    }
    if(c==g){
        if(c%2==0) c=c/2;
        else c=(c/2)+1;
        cout<<1+((c-1)*3)+30<<endl;return;
    }
    if(c==b){
        if(c%2==0) c=c/2;
        else c=(c/2)+1;
        cout<<2+((c-1)*3)+30<<endl;return;
    }
}
int main()
{
    solve();
}

/**
       ������������    ������������
		Author : Avi J Patel
       ������������    ������������
**/
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define pb push_back
#define mp make_pair
#define N 100000
#define mod 1000000007
int main()
{
    int r,g,b;
    cin>>r>>g>>b;
    int max1=max(r,g);
    max1=max(max1,b);
    if(max1==r && g==r-1 && r%2==0)
    {
    	max1=g;
	}
	if(max1==g && b==g-1 && g%2==0)
	{
		max1=b;
	}
    if(max1==b)
    {
    	int r1=b/2;
    	if(b%2==0)
		r1--;
    	int ans=30+3*r1;
    	ans+=2;
    	cout<<ans;
	}
	else if(max1==g)
	{
		int r1=g/2;
		if(g%2==0)
		r1--;
		int ans=30+3*r1;
		ans++;
		cout<<ans;
	}
	else
	{
		int r1=r/2;
		if(r%2==0)
		r1--;
		int ans=30+3*r1;
		cout<<ans;
	}
    return 0;
}

#include <iostream>
using namespace std;

int main(){
	int r, g, b, ans = 30;
	cin >> r >> g >> b;

	for(;r > 0 || g > 0 || b > 0; r-=2, g-=2, b-=2){
		if(g > 0 || b > 0) ans++;
			else break;
		if(b > 0 || r > 0) ans++;
			else break;
		if(r > 0 || g > 0) ans++;
			else break;
	}
	cout << ans;
}

#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;

int main() {
	int a[3];
	cin>>a[0]>>a[1]>>a[2];
	int b[3];
	int i;
	for(i=0; i<3; i++) {
		b[i]=a[i]%2;
		a[i]=(a[i]-1)/2;
	}
	int max=0;
	int pos=0;
	for(i=0; i<3; i++) {
		if(a[i]>=max) {
			max=a[i];
			pos=i;
		}
	}
	cout<<30+3*max+pos<<endl;
	return 0;
}

#include <iostream>

using namespace std;

int main()
{
    int sr,sg,sb;
    cin>>sr>>sg>>sb;
    int tim=30;
    sr=sr-2;
    sg=sg-2;
    sb=sb-2;
    tim=tim+2;
    //cout<<tim<<endl;
    while (true)
    {
        if (sr<=0 && sg<=0 && sb<=0)
            break;
        tim++;
        if (sr>0)
        {
            sr=sr-2;
        }
        if (sr<=0 && sg<=0 && sb<=0)
            break;
        tim++;
        if (sg>0)
        {
            sg=sg-2;
        }
        if (sr<=0 && sg<=0 && sb<=0)
            break;
        tim++;
        if (sb>0)
        {
            sb=sb-2;
        }
        if (sr<=0 && sg<=0 && sb<=0)
            break;
    }
    cout<<tim<<endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main() {
    int r, g, b;
    cin >> r >> g >> b;
    int ans = (r / 2) * 3 + (r % 2? 1: 0);
    ans = max(ans, (g / 2) * 3 + (g % 2? 2: 0));
    ans =  max(ans, (b / 2) * 3 + (b % 2? 3: 0));
    cout << ans + 30 - 1;
}

#include <bits/stdc++.h>
#define endl '\n'
#define pb push_back
using namespace std;
typedef long long ll;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int r, g, b;
    cin >> r >> g >> b;

    int ans;

    if(b >= r and b >= g) ans = b;
    else if(g >= r and g > b) ans = g;
    else ans = r;

    ans = (ans + 1) / 2;

    int time = (ans - 1) * 3 - 1;

    if(ans == g) time++;
    else if(ans == b) time += 2;

    cout << time + 30 << endl;

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define lli long long int
int main()
{
    lli r,g,b,max1 ;
    cin>>r>>g>>b ;
    if(r%2==0) r = r/2 ;
    else r = r/2 + 1 ;
    if(g%2==0) g = g/2 ;
    else g = g/2 + 1 ;
    if(b%2==0) b = b/2 ;
    else b = b/2 + 1 ;
    max1=max(max(r,g),b) ;
    if(max1==r) cout<<30+3*max1-3 ;
    else if(max1==g) cout<<30+3*max1-2 ;
    else cout<<30+3*max1-1 ;
}

#include<iostream>
using namespace std;
int a[4],t,z,x,ans;
int main(){
    cin>>a[1]>>a[2]>>a[3];
    z=a[1]+a[2]+a[3];
    for(int j=1;j<=10;j++){
        for(int i=1;i<=3;i++){
            x=i;
            if(a[i]>=2){
                a[i]-=2;
                z-=2;
                ans++;
            }else{
                z-=a[i];
                a[i]=0;
                ans++;
            }if(z==0)break;
        }
        if(z==0)break;
    }cout<<ans+29<<endl;
    return 0;
}

#include<algorithm>
#include<bitset>
#include<cassert>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<deque>
#include<iomanip>
#include<iostream>
#include<list>
#include<map>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<vector>
#include<sstream>
#define rep(i,n) for(int i=0;i<(n);i++)
#define ull unsigned long long
#define lint long long

using namespace std;

int main()
{
	int r,g,b;
	cin>>r>>g>>b;
	int time=0;
	string col[3]={"r","g","b"};
	int next=0;
	if(r)
	{
		time+=30;
		r-=min(r,2);
		next=(next+1)%3;
	}
	else if(g)
	{
		time+=31;
		g-=min(g,2);
		next=(next+1)%3;
	}
	else if(b)
	{
		time+=32;
		b-=min(2,b);
		next=(next+1)%3;
	}
	while(r||g||b)
	{
		if(next==0)
			{
				if(r)
				{
					r-=min(r,2);
					time+=1;
					next=(next+1)%3;
				}
				else if(g)
				{
					g-=min(g,2);
					time+=2;
					next=(next+1)%3;
				}
				else if(b)
				{
					b-=min(b,2);
					time+=3;
					next=(next+1)%3;
				}
			}
		else if(next==1)
		{
				if(g)
				{
					g-=min(g,2);
					time+=1;
					next=(next+1)%3;
				}
				else if(b)
				{
					b-=min(b,2);
					time+=2;
					next=(next+1)%3;
				}
				else if(r)
				{
					r-=min(r,2);
					time+=3;
					next=(next+1)%3;
				}

		}
		else
		{
				if(b)
				{
					b-=min(b,2);
					time+=1;
					next=(next+1)%3;
				}
				else if(r)
				{
					r-=min(r,2);
					time+=2;
					next=(next+1)%3;
				}
				else if(g)
				{
					g-=min(g,2);
					time+=3;
					next=(next+1)%3;
				}

		}
	}
	cout<<time;
	return 0;
}

    #include<bits/stdc++.h>

    using namespace std;

   // sort(a.begin(),a.end());
   // a.erase(unique(a.begin(),a.end()),a.end());
//long long int a[n],e[n];

    //cout<<"YES"<<endl;

//   a.push_back(m);
//}
//sort(a.begin(), a.end());
//a.erase(unique(a.begin( ),a.end( )),a.end( ));

    int main()
    {
        ios::sync_with_stdio(false);
        cin.tie(0);
        cout.tie(0);
    long long int l,u,n,i,m=0,x0,y,j=0,k=0,h,d,sum=0,s=0,x=0,w=0,max=-1,min=1000000000005;
n=3;
long long int a[n],e[n];
for(i=0;i<n;i++){
    cin>>a[i];
}

//vector<int>a;
 max=a[0];
for(i=0;i<n;i++){
    if(max<=a[i]){
        max=a[i];
        x=i+1;
    }
}

k=29+((max+1)/2)*3;
if(x==2){
    k=k-1;

}
else if(x==1){
    k=k-2;
}

cout<<k;

    return 0;
}

#include <iostream>
#include <cmath>
#include <complex>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <iomanip>
#include <functional>
#include <iterator>
#include <numeric>
#include <queue>

const double PI(acos(-1.0));
const double PI_2 = PI * 2.0;
double eps = 1e-9;

#define pb push_back
#define mp(a,b) make_pair(a,b)
#define all(x) x.begin(), x.end()
#define sqr(x) ((x)*(x))
#define F first
#define S second
#define inf (ll)(1e9+7)
#define infll (ll)(1e18+3)
#define sz(x) ((ll)x.size())
#define bits(x) __builtin_popcount(x)
#define bitsl(x) __builtin_popcountll(x)
#define rep(i, a, b) for (ll (i) = (a); i <= (b); ++(i))
#define forn(i, n) rep(i, 0, ((ll)n)-1)
#define INF 200000
#define rz resize

using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
typedef vector < ll > vll;
typedef vector<ll> vi;
typedef pair < ll, ll > pll;
typedef pair < ll, ll > pii;
typedef vector<vi> vii;
typedef vector<vi> vvi;
typedef vector<ull> vull;
typedef vector<pll> vpll;

int main() {
    ios_base::sync_with_stdio(false);
//    freopen("input.txt", "r", stdin);
    int n, m, k;
    cin >> n >> m >> k;
    if (n%2 == 0) {
        cout << 0; return 0;
    }

    int mi = inf;
    forn(i, n) {
        int t;
        cin >> t;
        if (i%2 == 0) mi = min(mi, t);
    }
    cout << min(mi, k*m/(n/2+1));
    return 0;
}
/* Mon Feb 27 2017 18:48:25 GMT+0300 (RTZ 2 (зима)) */

/* Mon Feb 27 2017 18:58:20 GMT+0300 (RTZ 2 (зима)) */

/* Mon Feb 27 2017 18:58:31 GMT+0300 (RTZ 2 (зима)) */

/* Mon Feb 27 2017 18:58:52 GMT+0300 (RTZ 2 (зима)) */

/* Mon Feb 27 2017 18:59:20 GMT+0300 (RTZ 2 (зима)) */

/* Mon Feb 27 2017 18:59:27 GMT+0300 (RTZ 2 (зима)) */

#include <iostream>
#include <algorithm>
#include <map>
#include <bitset>
#include <set>
#include <vector>
#include <queue>
#include <deque>
#include <stack>
#include <string>
#include <cstring>
#include <string.h>
#include <iomanip>
#include <stdio.h>
#include <sstream>
#include <stdlib.h>
#include <functional>
#include <locale>
#include <cmath>
#include <math.h>

using namespace std;

#define ll  long long
#define ld long double
#define OO 100000000000000000
#define PI 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844
#define fast ios_base::sync_with_stdio(0);cin.tie(0);
#define _CRT_SECURE_NO_WARNINGS
//ll arr[4];
//char op[3];
//ll calc(ll number1, ll number2, char operation)
//{
//	return (operation == '*') ? number1*number2 : number1 + number2;
//}
//ll solve()
//{
//	ll result1 = 0,result2=0,result3=0,result4=0,result5=0,result6=0;
//
//	result1 += calc(arr[0], arr[1], op[0]);
//	result1 += calc(result1, arr[2], op[1]);
//	result1 += calc(result1, arr[3], op[2]);
//
//	result1 += calc(arr[0], arr[1], op[0]);
//	result1 += calc(result1, arr[2], op[1]);
//	result1 += calc(result1, arr[3], op[2]);
//
//	result1 += calc(arr[0], arr[1], op[0]);
//	result1 += calc(result1, arr[2], op[1]);
//	result1 += calc(result1, arr[3], op[2]);
//
//	result1 += calc(arr[0], arr[1], op[0]);
//	result1 += calc(result1, arr[2], op[1]);
//	result1 += calc(result1, arr[3], op[2]);
//
//	result1 += calc(arr[0], arr[1], op[0]);
//	result1 += calc(result1, arr[2], op[1]);
//	result1 += calc(result1, arr[3], op[2]);
//
//	result1 += calc(arr[0], arr[1], op[0]);
//	result1 += calc(result1, arr[2], op[1]);
//	result1 += calc(result1, arr[3], op[2]);
//
//	return min(min(result6,min(result1,result2)),min(result5,min(result3,result4)));
//}
//int main()
//{
//	ll answer = OO;
//	cin >> arr[0] >> arr[1] >> arr[2] >> arr[3];
////	cin >> op[0] >> op[1] >> op[2];
////	sort(arr, arr + 4);
////	do
////	{
////		do
////		{
////			answer = min(solve(), answer);
////		} while (next_permutation(arr, arr + 4));
////	} while (next_permutation(op, op + 3));
////	cout << answer << endl;
////	return 0;
////}
int main()
{

	ll arr[3];
	pair<ld, short>Max;
	for (int i = 0; i < 3; i++)
	{
		cin >> arr[i];
		if (arr[i] >= Max.first)
			Max = { arr[i],i };
	}
	cout<<3 * (ceil(Max.first / 2.0)-1) + 30 + Max.second << endl;

	return 0;
}

/**********************************************************
 *     Code written by Akikaze                            *
 *     Duy-Bach Le, #Team4T's Chief Executor              *
 *     #Team4T Tertiary Flagship - Oblivion               *
 *                                                        *
 *     Written by a random fan of momocashew and Chiho    *
 *                                                        *
 *     Arigatougozaimasu, imouto-chan.                    *
 **********************************************************/

/************** [OPTIMIZATION PROTOCOL] **************/
#pragma comment(linker, "/stack:225450978")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
/*****************************************************/

/************** [LIBRARY PROTOCOL] **************/
#include <bits/stdc++.h>
using namespace std;
/************************************************/

/************** [LEGENDS/CONSTANTS] **************/
#define endl '\n'
#define i64 long long
#define ld long double
#define rsz resize
#define pub push_back
#define mp make_pair
#define fi first
#define se second
typedef vector<i64> vi;
typedef vector<ld> vd;
typedef vector<string> vs;
typedef vector<char> vc;
typedef vector<bool> vb;
typedef pair<i64, i64> pii;
typedef pair<i64, pii> pip;
typedef pair<pii, i64> ppi;
const long long Mod = 1000000007LL, INF = 1e9, LINF = 1e18;
const long double Pi = 3.141592653589793116, EPS = 1e-9, Gold = ((1+sqrt(5))/2);
long long keymod[] = {1000000007LL, 1000000009LL, 1000000021LL, 1000000033LL};
long long keyCount = sizeof(keymod) / sizeof(long long);
/*************************************************/

/************** [BITWISE FUNCTIONS] **************/
template<class T> int getbit(T s, int i) { return (s >> i) & 1; }
template<class T> T onbit(T s, int i) { return s | (T(1) << i); }
template<class T> T offbit(T s, int i) { return s & (~(T(1) << i)); }
template<class T> int cntbit(T s) { return __builtin_popcountll(s); }
/*************************************************/

/************** [MASTER CONTROLS - PHASE 1] **************/
auto TimeStart = chrono::steady_clock::now();
auto TimeEnd = chrono::steady_clock::now();
#define OImode 227420978
#define MultiTest 227420978

#undef OImode // Switch this off if submitting OI problems.
#undef MultiTest // Switch this off if submitting multi-test problems.

void ControlIO(int argc, char* argv[]);
void TimerStart();
void TimerStop();
void Exit();
/*********************************************************/

/************** [GLOBAL VARIABLES] **************/
i64 r, g, b;
/************************************************/

/************** [FUNCTIONS] **************/

void Input() {
	cin >> r >> g >> b;
}

void Solve() {
	i64 ans = 0;
	if (r) ans = max(ans, ((r-1)/2)*3+0);
	if (g) ans = max(ans, ((g-1)/2)*3+0);
	if (b) ans = max(ans, ((b-1)/2)*3+0);
	cout << ans+30;
}
/*****************************************/

/************** [MAIN] **************/
int main(int argc, char* argv[]) {
	ControlIO(argc, argv);
	ios_base::sync_with_stdio(0); cin.tie(NULL);
	#ifndef MultiTest
		Input(); TimerStart();
		Solve(); TimerStop();
	#else
		int T; cin >> T; TimerStart();
		while(T--) {Input(); Solve();}
		TimerStop();
	#endif
	return 0;
}
/************************************/

/************** [MASTER CONTROLS - PHASE 2] **************/
void ControlIO(int argc, char* argv[]) {
	#ifdef Akikaze
	time_t t = time(0);
	tm* now = localtime(&t);
	cout << "Source code by #Team4T-Akikaze.\n";
	cout << "Current time: ";
	cout << (now->tm_year + 1900) << '-'
	     << (now->tm_mon + 1) << '-'
	     <<  now->tm_mday << " | "
	     <<  now->tm_hour << ":"
	     <<  now->tm_min << ":"
	     <<  now->tm_sec
	     << "\n\n";
	if (argc > 1) assert(freopen(argv[1], "r", stdin));
	if (argc > 2) assert(freopen(argv[2], "w", stdout));
	#elif OImode
	freopen("FILENAME.INP", "r", stdin);
	freopen("FILENAME.OUT", "w", stdout);
	#endif
}

void TimerStart() {
	#ifdef Akikaze
	TimeStart = chrono::steady_clock::now();
	#endif
}

void TimerStop() {
	#ifdef Akikaze
	TimeEnd = chrono::steady_clock::now();
	auto ElapsedTime = TimeEnd - TimeStart;
	cout << "\n\nTime elapsed: " << chrono::duration<double>(ElapsedTime).count() << " seconds.\n";
	#endif
}

void Exit() {
	TimerStop(); exit(0);
}
/*********************************************************/

/*********************************************************************************************************************************************************************************************************
 * ti;.                               .:,:i:         :,;;itt;.        fDDEDDEEEEEEKEEEEEKEEEEEEEEEEEEEEEEE###WKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWW#WWWWWKKKKKEE      :,:.    f::::. .,ijLGDDDDDDDEEEEEEE*
 *ti;.                               .:,:i:          .:,;itt;:      GLDEEGEEEEEEEEEEEEEEEEEEDEEEEEEEEEEE#W#WEKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWWWWWKKKKKKG.     .::.      f:,...,ijLGDDDDDDDDEEEEEE *
 *ti;.                               .:,:i:            :,;;iti,    :fDDEEEEEEEEEEEEEEEKEEEEDEEEEEEEEEEEW##WEEEKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWWWWWWKKKKKKEG     .::.       .f,::,ijLGDDDDDDDDEEEEEE *
 *ti;.                               .:,:i:             .,,;iti;.  LDDEEEEEEEEEEKEEEEWEEEDDEEEEEEEEEEE#WWWEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWWKKKKKEDj    .::.        .:L;;ijfGDDDDDDDDDEEEEE *
 *ti;.                               .:,:i:              .:,;;iii:LLDEEEEEEEEEEEKEEEEEEEEDEEEEEEEEEEEW#WWEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKWWKWWWWWWWWWWWWWWKKKKKKKEL    .::.         .:;LijLGGDDDDDDDDEEEEE *
 *ti;.                               .:,:;:                :,;;ittfDEEEEEEEEEEEEEEEEKEEEGEEEEEEEEEEEKWWWEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWKKKKKKKELj   .::.          :,;jffGGDDDDDDDDDEEEE *
 *ti;.                               .:,:i:                 .,;;tGGDEEEEEEEEEEEKEEEKEEEDEEEEEEEEEEEEWWWEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWKWWWWWWKKKKKKKEEL   .::.          .:;itDGGDDDDDDDDDEEEE *
 *ti;.                               .:::;:                   :;ifDEEEEEEEEEEEEKEEEKEEEEEEEEEEEEEEEWWWEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#WWWKKKKKKKKEEf   .::.           :,itfGEDDDDDDDDDDDEE *
 *ti;.                               .:::;:                    :GGEEEEEEEEEEEKEKEEKEEEEEEEEEEEEEEEEWWEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#WKKKKKKKKKEEDG  .::.           .,;jfLGKDLDDDDDDEEDD *
 *ti;.                               .:::;:                     fDEEEEEEKKKKKKKKKEKEEEEEEEEEEEEEEE#WEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#KKKKKKKKKKEEf .:::.           .,;tfLGDEDDDDDDDDEEE *
 *ti;.                                :::;:                    fDEEEEEEKKKKKKKKKKWKEEEEEEEEEEEEEEEWKEEEEEEEEEEEEEEEEEEEEKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKW##KKKKKKKKKEEft :::.           .,;tfLGDDDKDDDDDDDDD *
 *ti;.                                .::;:                    fDEEEEEEKKKKKKKWKKKKKEEEEEEEEEEEEE#WEEWEEEEEDEEDEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#WKKKKKKKKEEGG :,:.           .,;tfLGGDDDKDDDDDDDD *
 *ti;.                                .:.;:                   tGDEEEEKKKKKKKKKKKKKKKKKEEEEEEEEEEEWEEKWEEEEEEEDEEEEEEEEEEEEEEKEKKKKKKKKKKKKKKKKKKKKKKKKKKWWWKKKKKKKEEDf :::.           .,;tfLGGDDDDEDDDDDDD *
 *ti;.                                .::;:                   fDEEEEEKKKKKKKKKKKWKKKKKKKKEEEEEEEWWEEWEEEEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKW##KKKKKKKEEEft.::.           .,;tfLGGDDDDDDEDDDDD *
 *ti;.                                .:.;:                  tGDEEEKKKKKKKKKKKKKKKKKKKKKKEKEEEEE#EEWWEEEEEEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKW#WKKKKKKEEEGD:::.           .,;tfLGGDDDDDDDEDDDD *
 *ti;.                                .:.,.                  LDEEEEKKKKKKKKKKWKWKKKKKKKKKKKKEEEKWEKW#EEEEEEEEEEEEEEEEKEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKW##KKKKKKEEEEf,,:.           .,;tfLGGDDDDDDDDEDDD *
 *ti;.                               ..:.,.                 LGDEEEEKKKKKKKKKKWKKKKKKKKKKKKKKKKKWEEW#WEEEEEEEEEEEEEEEKEEEEEEEEEEEEEEEEEEEKEKKKKKKKKKKKKKKKK##KKKKKEEEEEfi;,.           .,;tfLGGDDDDDDDDDKDD *
 *tt;.                                .:.,:                 jDEEEEKKKKKKKKKKWWKKKKKKKKKKKKKKKKKWKE#WWEEEEEEEEEEEEEEWEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKWWKKKKEEEEDfG;,:           .,;tfLGGDDDDDDDDDDKD *
 *tii,.                               .:.,.                tGDEEEEKKKKKKKKKKWWWKKKKKKKKKKKKKKKWKKWWWKEEEEEEEEEEEEEKEEEEEEEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKW#KKKKEEEEDGGi;,.          .,;tfLGGDDDDDDDDDDDE *
 *ti;;,:.                             .:.,:                fDEEEEKKKKKKKKKKKWKKKKKKKKKKKKKKKKKWEK#WWKEEEEEEEEEEEEDEEEEEEEEEEEEEEGEEEEEEEEEEEEEEEEEEEKKKKKKKWWKKEEEEEEDDf;;;,.         .,;tfLGGDDDDDDDDDDDD *
 *tii;,,:..                           ...,.               ;LEEEEEKKKKKKWKKKKWKKKKKKKKKKKKKKKKKEKKW#WEEEEEEEEEEEEEjEEEEEEEEEKEEEEGEEEEEEEEEKEEEEEEEEEEEEEEEEE#WKEEEEEEDDf;;;;,:        .,itfLGGDDDDDDDDDDDD *
 *ti;,,,,,:.                          ...,.               LDEEEEKKKKKKKKKKKWWWKKKKKKKKKKKKKKKWKK#W#WEEEEEEEEEEEDDLEEEEEEEEEWEEEEDEEEEEEEEEKEEEEEEEEEEEEEEEEEWWEEEEEEEDDfj,,,,,:.      .,itfGGGDDDDDDDDDDDD *
 *tii,,,,::::.                        ...,:              .fDEEEEKKKKKKWKKKKWWWKKKKKKKKKKKKKKKEKKW#WWEEEEEEEEEEEKiKEEKEEEEEEWEEEEDEEEEEEEEEEEEEEEEEEEEEEEEEEEWWEEEEEEEDDLD:::,,,:.     .,ijfGGGDDDDDDDDDDDD *
 *ti;:::::::::..                      .:.,:              LDEEEEKKKKKKKWKKKKWWKKKKKKKKKKKKKKKKtKKWWWWKEEEEEEEEEDiiDEEEEEEEEWWEEEEEEDEEEEEEEEEEEEEEEEEEEEEEEEEEWKEEEEEDDDGL:. .:,,,:    .,ijLGGGDDDDDDDDDDDD *
 *tt;. .::::::::..                    ...,:             :fDEEEKKKKKKKKKKKKWW#KKKKKKKKKKKKKKKKfKKWWWWKEEEEEEEEDti,DEKEEEEEEWWEEEDEEEEEEEEEKEEEEEEEEEEEEEDEEEEE#WEEEEEGGDGf:.  .:,;,:.  .,ijLGGDDDDDDDDDDDDD *
 *tt;.   .:::::::..                   ...,:             GDEEEKKKKKKKKWKKKKWWWKKKWKKKKKKKWWWKDEKLWWWWKKEEEEEEDEi,LDEEEEEEEEWWEEEEEEEEEEEEEEEEEEEEEEEEEDEDEEEEEW#EEEEDDDDGf,.    :,,,:...,ijLGGGDDDDDDDDDDDD *
 *tt;.    .....::::..                 ...,:             fDEEEKKKKKKKKWKKKKWWWWKKKWKKKKKKKKKKfWKiWWW#KKEEEEEEEi;.EDfEEEDEEiWWEEEEEEEEEEEEDGKEEEEEEEEEEDEEEEEEEWWEEEEDDDGGLi.     .,;,:::,ijLGGGDDDDDDDDDDDD *
 *tt;.      ....:::::.                ...,.            iDEEEEKKKKKKKKWKKWKWWWWWKKWWWKKKKKKKKtWKt#WWWKKEEEEEDji..DDKDDEDEGiWKEEEEEEEEEEDDEjEEEEEEEEEEEDEEEEEEEKWKEEDDDDGGff.      .:,;,,;ijLGGGDDDDDDDDDDDD *
 *tt;.        ....::::..              .:.,:           .LDEEEKKKKKKKKKKKKWWWWKWWWWWWWWWWKKKKWtKKiDWWWKKKEEEEKi:..DEDDDDDDiiWKEEEEEEEEEEDDEijDEEEEEKEEEEEEEEEEEEWWEEGDDDGGLG.       .:,;;iijLGGGDDDDDDDDDDDD *
 *tt;.          .....:::..            ...,.           .fEEEEKKKKKKKKWKKKKWWWWWWWWWWWWWWKWKKKiKDiLWWWWKEEEEEi,..fD:DDDDDti;WEEEEEEEEEEKDDi:iDDEEEEWEEEEEEEEEEEE#WEEGDDDDGGG.         :,iitjLGGGDDDDDDDDDDDD *
 *tti.            .....:::..          ...,.           GDEEEKKKKKKKKKWKKKWWW#WWWWWWWWWWWKWKKjiEjitWWWKKWEEEDi...DDLDDDDji;;WEEEEEEEEEEEDEj.iDDEEEEWEEEEEEEEEEEEWWEEDDDDDDGf.          .,;tjfLGGDDDDDDDDDDDD *
 *tti.              ....::::..        ...,.           fEEEKKKKKKKKKKKKKKKW#WWWWWWWWWWWWWWWWtiEiiiWWWKKEWKEi....D.EDDDEi;.fWEEEEEEEEEEDDfL.;EDDEEEWEEEEEEEEEEEEWWEEEDDDDDGf.           :;ijfLGGDDDDDDDDDDDD *
 *tti.                ....::::..      ...,.          LDEEEKKKKKKKKKKKKKKWWWWWWWWWWWWWWWW####WKiiiWWWKKKEEK,...:E:DDDEii..GWEEEEEEEEDWDDiL.,KDDEEEWEEEEEEEEEEEEWWKEEDDDDDGf:           .,itfLGGDDDDDDDDDDDD *
 *tti.                 .....:::..     ...,.          fDEEEKKKKKKKKKWKKKKWWWWWWWWWWWWW########WLiiWWWKKKEEjD...G,DDDDi;...EWEEEEEEEEDKDEii..LDDEEEWEEEEEEEEEEEEWWWEEDDDDDGfi           .,;tfLGGGDDDDDDDDDDD *
 *tti.                   .....:::..   ...,.         iGEEEKKKKKKKKKKWKKKKWWWWWWWWWWWW###########KiWWWKKEEE,.D..D.DDDii:...KKEEEEEEEEEDDj:...tEDEEEWEEEEEEEEEEEEWWWEEEDDDDDLL           .,;tjLLGGDDDDDDDDDDD *
 *tti.                     ....::::......:.         LEEEKKKKKKKKKKWWKKKWWW#KWWWWWWWW#####W####W##KWWKKEEL..:D.jjDDi;,....KKEEEEEEEDfDDi...:iKDEEEWKEEEEEEEEEEEWWWEEEEDDDDLG           .,;tjLLGGDDDDDDDDDDD *
 *tti.                        ...::::::..,.        :GEEEKKKKKKKKKKKKWWWWW##WWWWWWWWW##WKWK#W#W####WWKEEK.....G.DDti,.....KKEEEEEEDWGDf.,...iKDEEEWWEEEEEEEEEEEW#WEEEEEDDDGL           .,;tjLLGGDDDDDDDDDDD *
 *tti.                         ....::::::,.        GDEEKKKKKKKKKKKKKWWWW###WWWWWWWWWW#WWWK###W#####WKEKK.....jDDL;;......KKEEEEEEEEEDi.f...;KDEEEWWEEEEEEEEEEEWWWWEEEEEDDGf           .,;tjLLGGDDDDDDDDDDD *
 *tti.                           ....:::,,.       .LEEEKKKKKWKKKKKWWWWWW###WWWWWWWWWW#WWKW#WW##W#WWWKEKD:....:DD:;......;KEEEEEEEKiDD..f...,KKEEEWWEEEEEEEEEEEWWWWEEEEEDDDf           .:;tjLLGGGDDDDDDDDDD *
 *tti.                             ...::,,,:.     GDEEKKKKKKKKKKKKWWWWWWW#WWWWWWWWWWW#KjKWWWWWWWWWWWWEK.j,..;fD.;.......fKEEEEEDKG:Di..,....DKEEEWWEEEEEEKEKKKWWWWEEEEEEDDf           .:;tjLLGGDDDDDDDDDDD *
 *jti.                              ...::,,,,:.  .fEEEKKKKKWKKKKKKWWWWWWW#WWWWWWWWWWK#KKKWWWWWWWWWWWWWK..f:.:G.,:.......EKEEEEEKK;:E:.......fKEEEWWKEKEKKKKKKKW#WWEEEEEEDDf:          .,;tfLLGGDDDDDDDDDDD *
 *tti.                               ...:,,,;;,: iDEEKKKKKWKKKKKKKWWWWWWW#WWWWWWWWWWK#WDKWWKKWWWWWWWWWE..;G:G..,........KKEEEEEKi.Gi..:.....tKEEKWWWKKKKKKKKKKW##WKEEEEEEDfi          .,;tfLLGGGDDDDDDDDDD *
 *tti.                               ....::,,;;;,LEEKKKKKKWKKKKKWWWWWWW###WWWWWWWWWWKWWDKWEEEWKKWWWWWKKj.:LG..;.........EKEEEEKG;.G...;.....;KKEKWWWKKKKKKKKKKW##WWKEEEEEDfL          .,;tfLGGGDDDDDDDDDDD *
 *jti.                                ...::::,;ijDEEKKKKKWKKKKKKWKWWWWW##WWWWWWWWWWWKK#KKGDGDWEEWKKWKKGE,.i;.:.........:EKEEEKE;.:L...j.....,KWEKWWWKKKKKKKKKK####WKKEEEEDLG          .,;tfLGGGGDDDDDDDDDD *
 *jti.                                ...:...,,;GEEKKKKKWWKKKKKWWWWWWWW###WWWWWWWWWKKKWWKiLGGEDEDEKGKKiEG..;...........jKEEEKK;:.G....,.....:KKEWWWWKKKKKKKWKK####WKKKKEEEGL          .,;tfLGGGGDDDDDDDDDD *
 *jti.                                ...:.  .:,GEEKKKKKWKKKKKWWWWWWWW####WWWWWWWWWKKKWWKii;fDLGDK: EEi:E:.............EKEEKK;;..L...........KKKWWWWKKKKKKKWKK####WKKKWKEEDf          .,;tfGGGGDDDDDDDDDDD *
 *jti.                                ...:.    ,EEKKKKKWWKKKKKWWWWWWWWW###WWWWWWWWKKKKfWWLt;i,. fi  EG..D:.............EKEKK;;..t....:.......KWKWWWWKKKKKKKWKK####WKKKWEEEDf:.        .,;tfGGGGDDDDDDDDDDD *
 *jti.                                ...:.    GEEKKKKKWKKKKKWWWWWWWWW####WWWWWWWKKKKKt;KKEfff     .;t.................KKKKi;:..GtGGfG.......KWWWWWWKKKKKKKWKK###WWWKKKKEEEf,,:       .,;tfGGGGDDDDDDDDDDD *
 *jti.                                ...:.    GEKKKKKWWKKKKKWWWWWWWWWW##WWWWWWWKKKKKKt;EiKKKK,   ...t................jEKKG;;..,.....,LGi....KWWWWWWKKKKKKWKKKW####WKKKKKEEL,,,:.     .,;tfGGGDDDDDDDDDDDD *
 *jti.                                ...:.  .GEEKKKKKWKKKKKWWWWWWWWWW###WWWWWWWKKKKKKtiE::tGG........................EEEj;;...,.........:D..DKWWWWWWKKKKK#KKW###W#WKKKKKEEfj:,,,:.   .,;tfGGGDDDDDDDDDDDD *
 *jti.                                ...:.   DEKKKKKWWKKKKKWWWWWWWWW####WWWWWWWKKKKKKiiE:::.::.......................EEi;;...j.....f......:iDKWWWWWWKKKKK#WW######WKKKKKEELG :,,,,:. .,;tfGGGDDDDDDDDDDDD *
 *jti.                                ...:.  fEEKKKKWWKKKKWWWWWWWWWWW###WWWWWWWWKKKKKK;tE::..........................DD;.;,.::......;........EWWWWWWWKKKKW#WW#####WWKKKWKKELG  .:,,,:::,;tfGGGDDDDDDDDDDDD *
 *jti.                                ...:. .DEKEKKKWWKKKKWWWWWWWWWWW###WWWWWWWWKKKKKE,iD::..........................D..,;.,;tLffi...........DWDWWWW#KKKWWWWW#####W#KKKWKEEGL    .:,;,,,;tfGGGDDDDDDDDDDDD *
 *jti.                                ...:. ;EEKKKKWWKKKKKWWWWWW#WWWW####WWWWWWKKKKKEL:iD:..........................j ..;..;;:.....i,........DKtWWWWWKKWWWWWW#####WWWKKKEKEDf     .:,;;;itfGGGDDDDDDDDDDDD *
 *jti.                                ...:. DEKKKKKWWKKKKWWWWWWW#WWWW####WWWWWWKKKKKEj:iG...............................:....................GKiWWWWWKKWW#WWW######WWKKKKKEEf       .,;iitfGGGDDDDDDDDDDDD *
 *jti.                                ...:.:EKKKKKWWKKKKKWWWWWWW#WWW#####WWWWWKWKKKKEi:if:.................................iEKEKKKKKKDj......DKiWWWWWKWK##WW#######WWKKK:KEEL        .:;itfGGGDDDDDDDDDDDD *
 *jji.                                ...:,DEEKKKWWWKWKKWWWWWWWWWWWW#####WWWWWWWKKKKEi:it..................................j.  KKKKKKKKKKKf..DKiWWWWWKWW##WW#######WWKKK,KEEf         .,;tfGGGDDDDDDDDDDDD *
 *jji.                                ..L:iDEEKKKWWKKKKKWWWWWWWWWWWW#####WWWWWKWKKKKKi.i;..................................  . KKKWWWWWWWWK..DGiWWWWWKK##WWW#####W#WWKKKjEKEL,        .:;tfGGGDDDDDDDDDDDD *
 *jji.                               .f:::EEEKKKWWWKKKKKWWWWWWWWWWWW#####WWWWWKWKKKKK;.i,.................................::  KKEKWWWWWWfWK..EiiWWWWWKWW#WW##########KKKD,KELj        .:;tfGGDDDDDDDDDDDDD *
 *jji.                             .t::::,DEEKKKWWKKKKWWWWWWWWW#WWWW#####WWWWKKWKKKEK;.i:.................................GDDEEEKKKWWWWWtWWD.E;iWWWWWW###WW#########WWKKK.EEDG        .:;tfGGGDDDDDDDDDDDD *
 *jji.                          . j..::::EKEKKKWWWKKKKWWWWWWWWW#WWW######WWWWKKWKKKEK;.t:.................................ELLEDDEEEWWWWEtWK,.KiiWWWWWW###W##########WWKKK:EEEG     .;tjfLLGDDDDDDDDDDDDDDD *
 *jji.                          i.::::::,EEEKKWWWKKKKKWWWWWWWWW#WWW#####WWWWWKWKKKKEE,.t..................................DfiEGDDDEEKKKttKWG.KiiWWWWW##WWW##########WWKKK:fEEL  ,fGGGDDDDDDDDEEEDDDDDDDDDD *
 *jji.                        .;:..:::::DEEEKKWWWKKKKKWWWWWWWWW#WWWW####WWWWWWWKKKKED,.t..................................ifjDDGGEGDKK.ttKKE.DiWWWWW###WW##########WWWKKK:.KELiLGGGGDDDDDDDDDDDDEEEDDDDDDD *
 *jji.                       i.:.::::::,KEEKKWWWKKKKKKWWWWWWWWW#WWWW####WWWWWWWKKKKEL:.j..................................GGf,;ifLLED .iiKKi:fWWWWWW##W#W##########WWWKKK:.KKLGGDDDDDDDDDDDDDDDDEDDEEDDDDD *
 *jji.                     .j:.::::::::EEEKKKWWWKKKKKKWWWWWWWW##WWW#####WWWWWWWKKKKKf:.f..................................:EEfftf .,. ;iE,..jWWWWWWW###W############WWKKK,:KKGDDDDDDDDDDDDDDDDDDDDDDDEDDDD *
 *jji.                    .:.::::::::,,EEEKKWWWKKKKKKKWWWWWWWW##WWW#####WWWWWWWKKKKKt..G....................................EEELL;   .j....tKWWWWWWW################WWWKKtfGKGEDDDDDDDDDDDDDDDDDDDDDDDEEDD *
 *jji.                   :...:::::::,,jEEKKWWWWKKKKKKWWWWWWWWW##KWW#####KWWWWWWKKKKEi..D....................................:jEEE.........;KKWWWWWWWW#WW##W##########WWKKDLGKEKDDDDDDDDDDDDDDDDDDDDDDDDDED *
 *jji.                  i:.::::::::,,,EEEKKWWWWKKKKKWWWWWWWWWW##WWW#####WWWWWWWKKKKKi..D......................................:::::......,KKKWWWWWWWWW#####W########WWWKKKGGKKEGGGGGGGGDDDDDDDDDDDDDDDDDDE *
 *jji.                 i..:::::::::,,tEEKKWWWWKKKKKWWWWWWWWWWW##WW######WWWWWWWKKKKKi..D......................................::::......:EKKKWWWWWWWWWWW##WW########W#WKKWGGKKGGGGGGGGGGGGGGGDDDDDDDDDDDDD *
 *jji.                .:::::::::::,,,EEEKKWWWWKKKKKWWWWWWWWWWW##WW#####WWWWWWWWKKKKKi..D....................................:::::::::..tELii;KWWWWWWWWWW##WW######WWWWWWKWGGGKGGGGGGGGGGGGGGGGGGGGGGGGGGDG *
 *jjt.                :.::::::::,,,,fEEKKWWWWKKKKKKWWWWWWWWWW###WW####WWWWWWW#WKKKKKi..D....................................:::::::.:.,;;;;;;,KKWWWWWWWWW#WW########WWWKKWGGGKGGGGGGGGGGGGGGGGGGGGGGGGGGGG *
 *jji.               ;.::::::::,,,,;EEEKWWWWWKKKKKWWWWWWWWWWWW##WW###WKWWWWWK#WKKKKKi..G......................................:::::::,;;;;:...KKKWWWWWWWWWKWW#######WWWWKKGLGKDGGGGGGLLGGGGGGGGGGGGGGGGGGG *
 *jjt.              f.:::::::::,,,,fEEKKWWWWWKKKKKWWWWWWWWWWW###WW##WKKWWWWWW#WKKKKK;.jt........i.............................:::::::;j;;....:E.KKKWWWWWWWKWW#####W#WWWWKKLLGWEEGGGGGLGGGGGGGGGGGGGGGGGGGG *
 *jjt.             ...:::::::,,,,,;DEEKWWWWWKKKKKWWWWWWWWWWWW####WWWKKKWWWWWWWWKKKKK;.E;.........t.............................:::::ii;;.....D...KKWWWWWWWKWW#####WWEWWWKKGGGEKKGGGGGLGGGGGGGGGGGGGLGGGGGG *
 *fji.             ;.:::::::,,,,,;LEEKKWWWWWKKKKKWWWWWWWWWWWW####KWKKKKWWWWWWWWKKKKKi.D;..........j.............................:::tt;,.....:.....KKWWWWWWKWWWW##WWWGWWWKKGGGGKEGGGGGGGGGGGGGGGGGGGLLGGGGL *
 *fji.            t::::::::,,,,,,;EEEKWWWWWKKKKKKKWWWWWWWWWWW##WKWKKKKKWWWWWWWWKKKKKi:D;............j...........................::LL;,.............KKWWWWWKWWWWWWWWWGWWWKKGGGGKGGGGGGGGGGGGGGGGGGGGLLGGGGL *
 *fjt:            .:::::::,,,,,,,DEEKWWWWWWKKKKKKKWWWWWWWWWWWWKKWKKKKKKWWWWK#WWKKKKWitE;........... ............................:G;;:...............KKKWWKKWWWWWWWWWGWWWKKGGGGWGGGGGGGGGGGGGGGGGGGGGGGGGGL *
 *fjji;:.       .f:::::::,,,,,,,;EEEKWWWWWWKKKKKKWWWWWWWWWWWKKKKKKKKKKKWWKWWWWWKKKKWGKD;........................................L;;..................DKKWKKWWWWWWWWWGWWWKKDGGGKDGGGGGGGGGGGGGGGGGGGGGGGGGG *
 *fjjtii;,:.     :::::::,,,,,,,;EEEKWWWWWWKKKKKKWWWWWWWWWWKKKKKKKKKKKKWWWWWW#WWKKKKWiEj;......................................:i,;....,...............;KKEKWWWWWWWWWGKWWKKDDGGDEGGGDGGGGGDGGGGGGGGGGGGGGGG *
 *fjtiiiii;;:.  j::::::,,,,,,,;;EEEKWWWWW#KKKKKWWWWWWWWWKKKKKKWKKKKKKKWWWWWWWWWKKKKWtEL;:....................................;;;:...,;j................:KEEWWWWWWWWWDDWWKKDDDDDKDDDDDDDDDDDDDDDGGGGGGGGGGG *
 *fjti;;iiii;;,:::::::,,,,,,,,;EEEKWWWWWWWKKKKWWWWWWWWKKKKKKKWKKKKKKKWWWWWWW#W#KKKKWEEii;...................................f;:....,;L...................EEKWWWWWWWWDDWWKKDDDDDKEDDDDDDDDDDDDDDDDDDDDDGGGG *
 *fjt,,,;;;;ii;f::::::,,,,,,,;;EEKWWWWWWWKKKKKWWWKWWKKKKKKKKKKKKKKKKKWWWWWWW#W#KKKKWKEij;:...............................:G;,.....,;f....................:tKKWWWWWWWDDWWKKDDDDDKKDDDDDDDDDDDDDDDDDDDDDDDDD *
 *jjt. ..:,;;;;,::::,,,,,,,,;;GEEWWWWWWWWKKKKWKKWKKKKKKKKKKKKKKKKKKKKWWWWWWW#W#KKKKWEDi;j;............................,Li;L;;;..,;;f........................KKKKWWWKDDWWKKDDDGDKKGGGGGGGGDGDDDDDDDDDDDDDDD *
 *fjt.    .:,,,:::::,,,,,,,;;;EEKWWWWWWWKKKKKKWKKKKKKKKKKKKKKKKKKKKKWKKKWKW##W#KKKKWEti;;G;........................tEEEL;;;;;;;;;;L..........................DKKKKKEDDWWKEDGftiLE;;;;itjLGGGGGGDDDDDDDDDDD *
 *fjt.       .j::::,,,,,,,;;;DEEWWWWWWWWKKKKWKKKKKKKKKKKKKKKKKKKKKKKWKKWWWK##W#KKKKKEii;;;L;...................iDEEEEEEKKi;j;;;;jD.....:......................,KKKKDGGEKKE:::::;E::::::::::,tLGGDDDDDDDDDD *
 *fjt.       .;:::,,,,,,,;;;;EEKWWWWWWWWKWKKKKKKKKKKKKKKKWKKKKKKKKKKWKKWWWW#WW#KKKKKKii;;;;f;.............:tDEEEEEKKKKKKKKEti;;;L...............................EEKf;:iKKE::::::E::::::::::::::ifDDDDDDDDD *
 *fjt:        :::,,,,,,,,;;;DEEWWWWWWWWWEKKKKKKKKKKKKKKKKKKKKKKKKKKWWKKWWWW####KKKKKEiii;;;;f,.........iDEEEEKKKKKKKKKKKKKKKf;iG......i..........................fK::::KKE::::::E::::::::::::::::,tGGDDDDD *
 *fjt:       t:::,,,,,,;;;;iDEKWWWWWWKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWKKWWWW####WKKKKLiii;;;;;L,....,Li;EDEEEEKKKKKKKKKKKKKKKKiG......;:...........................:i:::KKE:::::,E,::::::::::::::::::iGDDDD *
 *jjt.       f::,,,,,,,;;;;GEEWWWWKEEKEKKKKKKKKKKKKKKKKWKKKKKKKKKKKWWKWWWWW###WWKKKKiii;;;;;;;G,;L;;iiEEEEEEEKKKKKKKKKKKKKWWKE......;t.........:....................j::KEE:,::,,D,,::::,,,,,,:::::::::tDDD *
 *fjt:.      ,::,,,,,,,;;;;EEWWKEEEEEEKKKKKKKKKKKKKKKKWKKKKKKKKKKKWWKKWWWWW#W#KKKKKKiiiiii;;;;;i;;iiiEEKEEKKWKKKKKKKWKKKKKWWWGi;...;t......,;;;;,....................:,EEE,,,,,,D,,,,,,,,,,,,,,,,::,::::tG *
 *fjt:.     ,::,,,,,,,;;;;DEKEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWW#W#KKKKKKiiiii;;i;;;;;iiiKKKEKKKKWWKWWWWWWKKKKWWWWW;;;:;L.....;;;;;;;;;....................,KEE,,,,,,E,,,,,,,,,,,,,,,,,,,,,,,,; *
 *fjt:.     f:,,,,,,,;;;;jEDEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWW#W##KKKKKKiiiiiiii;i;;iiiEKKKKKKKKWKWWWWWWWWKKKWWWWWKi;;i.....,jEEfGi;;;;;...................EED,,,,,,E,,,,,,,,,,,,,,,,,,,,,,,,, *
 *fjt:.    .f::,,,,,,;;jEEDEEEEEEEEEEKKKKKKKKKKKKKKKWKKKKKKKKKKKKKWWWKWWWWW###KKKKKLiiiiiiiiiiiiiiEEKKKKKKKKWWWWWWWWWWWWKWWWWWWGi;i;,..;jDDDKEGi;;;;;;:................EED,,,,,,D,,,,,,,,,,,,,,,,,,,,,,,,, *
 *fjt:.  .. ;::,,,,,;;EDDEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWKKW#WW####KWKKKiiiiiiiiiiiiijKKKKKKKKKKWWWWWWWWWWWWWWWWWWWWWt;i;;;;i;DDDDDDGi;;;;;;;;:.............EDf;,,,;,G;;;;;;;;;;;;;;;,,,,,,,,,, *
 *fjt:......:,,,,,,;LDDDEEEEEEEEEEEKKKKKKKKKKKKKKKKWKKKKKKKKKKKKKWWWWKWWWW####KKKKKiiiiiiiiiiijKEKKWKKKKKKKWWWWWWWWWWWWWWWWWWWWWWiLiii;i;DEEEEDDE;i;;;;;;;;;:..........EDi,;;;;;L;;;;;;;;;;;;;;;;;;,,,,,,, *
 *fjt:......:,,,,,;EDDDEEKEEEEEEEEEKKKKKKKKKKKKKKKWKKKKKKKKKKKKKKWWWWKKWWW##W#KWKKWEiiiiiijGKKKKKWWKKKKKKKKWWWWWWWWWWWWWWWWWWWWWWKi;iiiiDDEEEEEEDEi;;;;;;;;;;;;;,:.....ED;;;;;;;j;;;;;;;;;;;;;;;;;;;;;;;,, *
 *fjt:.....t,,,,,;DDDDEEEKEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWKKKWWWW##WKWKKWKiiiKKKKKKKKKWWKKKKKKKKWWWWWWWWWWWWWWW#WWWWWWWWWiiiiifLEEEEEEEEDi;i;;;;;;;;;;;;.....DD;;;;;;;i;;;;;;;;;;;;;;;;;;;;;;;;; *
 *fjt:.....G,,,,,GDDDEEEEEEEEEEEEKKKKKKKKKKKKKKKKWKKKKKKKKKKKKKKKWWWKKKWWW###WKWKKWKitKKKKKKKKKWKKKKKKKKKKWWWWWWWWWWWWWW###WWWWWWWWEiiiiiiiEEEEEEEEDGiiii;;;;;;;;;.....GD;;;;;;;i;;;;;;;;;;;;;;;;;;;;;;;;; *
 *fjt:.....L,,,,;GDDDEEEEEEEEEEKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWDGWWW###KKWWKWKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWW####WWWWWWWWWiiiiiiiiEEEEEEEEEEDi;i;;;;;;;;.....Lj;;;;;;i;iiiiii;;;;;;ii;;;;;;;;;;; *
 ***********************************************************************************************************************************************************************************************************/

/*
 *	 				SPOJ Problem Code: 73_a
 * 					Solved By: Udit Agarwal (IIITA)
 */

#include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#include <cstring>
#include <string.h>
#include <cstdlib>
#include <sstream>
#include <stack>
#include <queue>
#include <numeric>
#include <utility>
#include <cctype>
#include <list>
#include <climits>
#include <signal.h>
#include <ctime>
#include <map>
#include <set>

using namespace std;

int main(){

	long long int i, j, k, ct=0, n, t, x, y, z, tx, ty, tz;
	double a, b, c, d;
	char p, q, r, s;

	string str, s1, s2, s3;
	map<int, int> m;
	vector<int> v;

		//scanf( "%lld", &n );
		cin >> x >> y >> z;;
		n = 0;

		tx=ty=tz=0;
		if(x!=0){

		tx = (x)/2;
		tx = tx*3+30-1;
		}
		if(y!=0){
		ty = (y)/2 ;
		ty = ty*3+1+30-1;
		}
		if(z!=0){

		tz = (z)/2;
		tz = tz*3+2+30-1;
		}

		k = max(max(tx, ty), tz);

		cout << k;

	return 0;
}

#include<iostream>
#include<cstdio>
#include<string>
using namespace std;
int a,b,c;

int main()
{
    while(scanf("%d%d%d",&a,&b,&c)==3)
    {
        int ans=30;
        int d=0;
        if(a>=b && a>=c)
        {
            ans+=(a/2-1)*3+(a%2)*3;
        }
        if(b>=a && b>=c)
        {
            ans+=(b/2-1)*3+(b%2)*3+1;
        }
        if(c>=a && c>=b)
        {
            ans+=(c/2-1)*3+(c%2)+2;
        }
        printf("%d\n",ans);
    }
//  system("pause");
    return 0;
}

#include<bits/stdc++.h>

using namespace std;

int r, b, g, ans, A;

int main ()
{
    cin >> r >> g >> b;
    A = 30;
    while(r)
    {
        r -= 2;
        if(r <= 0)
            break;
        A += 3;
    }
    ans = max(A, ans);
    bool B = 0;
    while(g)
    {
        if(B == 0)
        {
            B = 1;
            A += 31;
        }
        g -= 2;
        if(g <= 0)
            break;
        A += 3;
    }
    ans = max(A, ans);
    B = 0;
    while(b)
    {
        if(B == 0)
        {
            B = 1;
            A += 32;
        }

        b -= 2;
        if(b <= 0)
            break;
        A += 3;
    }
    ans = max(A, ans);
    cout << ans;
return 0;
}

#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;

#define FOR(i,a,b) for(int i=a;i<b;i++)
#define REP(i,n) FOR(i,0,n)
#define pb push_back
#define sz size()
#define INF (int)1e9

typedef long long LL;
typedef vector<int> VI;
typedef vector<string> VS;
typedef vector< vector <int> > VVI;
typedef pair<int,int> pii;

void wait() { getchar(); getchar(); }

int main() {
  int r,g,b;
  cin>>r>>g>>b;
  int cnt=0;
  VI a; a.pb(r); a.pb(g); a.pb(b);
  int m=0,pos;
  REP(i,a.sz) {
     if(a[i]>=m) {
        m=a[i];
        pos=i;
     }
  }
while(m>0) {
  cnt++;
  m-=2;
}
cout<<(cnt-1)*3+pos+30;
wait();
}

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cassert>
#include <cmath>
#include <sstream>
#include <fstream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <bitset>
#include <string>
#include <algorithm>

using namespace std;

int main()
{
int r=0,g=0,b=0,j=-1,j1=0,j2=1;
bool x=1,n=1,c=1;
cin>>r>>g>>b;

while(r!=0||g!=0||b!=0){
j++;
if(x){
if(r<2 && r!=0){
r--;
x=0;
continue;
}
else if(r!=0){
r-=2;
x=0;
continue;
}
else j++;
}
if(n){
if(g<2 && g!=0){
g--;
n=0;
continue;
}
else if(g!=0){
g-=2;
n=0;
continue;
}
else j++;
}
if(c){
if(b<2 && b!=0){
b--;
c=0;
//continue;
}
else if(b!=0){
b-=2;
c=0;
//continue;
}
//else j++;
}
x=1,n=1,c=1;
}

cout<<30+j;
return 0;
}

#include<stdio.h>
#include<string.h>

int main(){
	int r,g,b,num,sum,max,i,f;
	int a[5];
	int time;
	while(scanf("%d%d%d",&a[1],&a[2],&a[3])!=EOF){
		 max=-1;
		 time=30;
		 for(i=1;i<=3;i++){
		 	if(max<=a[i]){
			 	max=a[i];
				 f=i;
		 	}
		 }
		 time+=(max/2)*3;
		 if(max%2)time+=f-1;
		 printf("%d\n",time);
	}
	return 0;
}

#include<iostream>
#include<string>
#include<sstream>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<deque>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<algorithm>
using namespace std;

int main(){
    int r,g,b;
    while(cin >> r >> g >> b ){
        int sum=0;
        if(r>0) r-=2,sum=30;
        if(g>0) sum=31,g-=2;
        if(b>0) sum=32,b-=2;
     while(r>0||g>0||b>0){
        // cout << r << " " << g << " " << b << endl;
        if(r>0) r-=2,sum+=1;
        if(g>0) sum+=2,g-=2;
        if(b>0) sum+=3,b-=2;
     }
        cout << sum << endl;
    }
  return 0;
}

#include <iostream>

using namespace std;

int main()
{
    int cars[3];
    int r,g,b;
    cin>>r>>g>>b;
    int t=29;
    while(true){
        if(r>2){
            r=r-2;
            t=t+1;
        }
            else
            {
            r=0;
            t=t+1;
            };
        if(g>2){
            g=g-2;
            t++;
        }
            else
            { g=0;
              t=t++;
            };
        if(b>2){
            b=b-2;
            t++;
        }
            else
            {
                b=0;
                t++;
            };
        if(r<=0 && g<=0 && b<=0){
            break;
        }
    }
    cout<<t;

    return 0;
}

/*int div(int n)
{
    int cnt = 0;
    for (int i = 2; i*i<=n; i++) {
        if (n % i == 0) {

                return i;
        }
    }
    return n;
}   */

/*
inline bool cmp (const pii &a, const pii &b)
{
    if (a.first != b.first)
        return a.first > b.first;

    return a.second < b.second;
}
sort(a,a+n,cmp);
 */

#include<bits/stdc++.h>
#include<string>
using namespace std;

int main()
{

   int r,g,b;
   cin>>r>>g>>b;

   int t=30;

   int x=r/2+r%2;
   int y=g/2+g%2;
   int z=b/2+b%2;

   int a=max(x,max(y,z));
   if(a==z)
      t+=b/2*5;
    else if(a==y)
     t+=g/2*4;
    else if(a==x)
     t+=r/2*3;

    cout<<t;

  return 0;

}

#include<iostream>
#include<stdio.h>
#include<string>
#include<vector>
#include<map>
#include<algorithm>
#include<memory.h>
#include<numeric>
#include<climits>
using namespace std;

int main()
{
    //freopen("input.txt","r",stdin);
    int r,g,b;
    while(cin>>r>>g>>b)
    {

        int i=0;
        int offset=0;
        r=30+((r-1)/2)*3;
        g=31+((g-1)/2)*3;
        b=32+((b-1)/2)*3;
        int goal[]= {r,g,b};
        int ans=*max_element(goal,goal+3);
        cout<<ans<<endl;

    }

    return 0;
}

#include <iostream>
#include <cstdio>
#include <queue>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string.h>
#include <string>
#include <set>
using namespace std;

int r, g, b;
int last;

int main() {
    scanf("%d %d %d", &r, &g, &b);
    for(int i = 0; i < 100000; i++) {
            for(int j = 0; j < 3; j++) {
                    if (j == 0) {
                          if (r > 2) r -= 2;
                          else if (r != 0) {
                               r = 0;
                               last = i * 3 + j + 1;
                          }
                    }
                    if (j == 1) {
                          if (g > 2) g -= 2;
                          else if (g != 0) {
                               g = 0;
                               last = i * 3 + j + 1;
                          }
                    }
                    if (j == 2) {
                          if (b > 2) b -= 2;
                          else if (b != 0) {
                               b = 0;
                               last = i * 3 + j + 1;
                          }
                    }
            }
    }
    printf("%d", last + 30);

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
_(int x)  {return (x / 2 + x % 2  - 1) * 3 + 1;}
int main()
{
	int red, green, blue;
	cin >> red >> green >> blue;
	red = _(red), green = _(green),
	blue = _(blue);
	cout << 29 +
	max(red, max(green, blue));
}

#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;

int main() {
	int a[3];
	cin>>a[0]>>a[1]>>a[2];
	if(a[0]<3 && a[1]<3  && a[2]<3) {
		if(a[2])
			cout<<32<<endl;
		else if(a[1])
			cout<<31<<endl;
		else
			cout<<30<<endl;
		return 0;
	}
	int b[3];
	int i;
	for(i=0; i<3; i++) {
		b[i]=a[i]%2;
		a[i]=(a[i]-1)/2;
	}
	int max=0;
	int pos=0;
	for(i=0; i<3; i++) {
		if(a[i]>=max) {
			max=a[i];
			pos=b[i]*i;
		}
	}
	cout<<30+3*max+pos<<endl;
	return 0;
}

#include <bits/stdc++.h>
#define endl "\n"
#define ll long long
using namespace std;
int main()
{   ios::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
    int a,b,c,x,y,z;
    cin>>a>>b>>c;
    if(a%2==0)
       x=a/2;
    else
       x=a/2+1;
    if(b%2==0)
       y=b/2;
    else
       y=b/2+1;
    if(c%2==0)
       z=c/2;
    else
       z=c/2+1;
    if(a==1)
       x=1;
    if(b==1)
       y=1;
    if(c==1)
       z=1;
    //  cout<<x<<" "<<y<<" "<<z<<" "<<endl;

    if(z>x&&z>y)
     { x=z+1;y=z;}
    else if(x>y&&x>z)
    {y=x-1;z=x-1;}
    else if(y>x&&y>z)
    { x=y;z=y-1;}
   // cout<<x<<" "<<y<<" "<<z<<" ";
       cout<<30+x-1+y+z;

    return 0;
}

#include<stdio.h>

int time(int c)
{
    int cl[10],i=0,ct=0;
    while(!(c<1))
    {
        cl[i]=1;
        i++;
        c-=2;
    }
    for(int j=0;j<i;j++)
    {
        if(j==0) ct+=1;
        else ct+=30;
    }
    return ct;
}

int main()
{
    int r,g,b,t,rt=0,gt=0,bt=0;
    scanf("%d%d%d",&r,&g,&b);
    int i=0,red[10],gre[10],blu[10];
    //rt=time(r);
    //gt=time(g);
    bt=time(b);
    t=rt+gt+bt;
    printf("%d",t);
    printf("\n");
    return 0;
}

#include <bits/stdc++.h>

using namespace std;
int ans = 30 ;
int r,g,b,mx,steps,d1,d2,d3;
int main()
{
    scanf("%d%d%d",&r,&g,&b);
    d1 = r-g ;
    d2 = g-b ;
    if(r>=g&&r>=b)
    {
        if(r%2==0&&b==r-1)
        {
            steps = 2;
        }
        else if(g==r-1)
        {
            steps = 1;
        }
        mx    = r;

    }
    if(g>=r&&g>=b)
    {
        if(g%2==0&&b==g-1)
        {
            steps = 2;
        }else
        {
            steps = 1;
        }
        mx    = g;

    }
    if(b>=r&&b>=g)
    {
        mx    = b;
        steps = 2;
    }
    if(mx==1)
    {
        ans += steps;
        printf("%d",ans);
        return 0 ;
    }
    mx--;
    if(mx!=-1)
    {
        ans += (mx/2)*3 ;
        ans += steps;
    }
    else
    {
        printf("%d",0);
        return 0 ;
    }
    printf("%d",ans);

    return 0;
}

#include <bits/stdc++.h>
#define pb push_back
using namespace std;
typedef long long ll;
int a[101];
int main()
{
	int r, g, b;
	cin >> r >> g >> b;
	int cost = 27;
	if(r == g && g == b)
    {
        cost += ceil(double(r)/2) * 3 - 1;
    }
	else if(r > g && r > b)
	{
		cost += ceil(double(r)/2) * 3 ;
	}
	else if(g > r && g > b)
	{
		cost += ceil(double(g)/2) * 3  + 1;
	}
	else
	{
		cost += ceil(double(b)/2) * 3 + 2;
	}
	cout<<cost<<endl;
	return 0;
}

#include <iostream>
#include <fstream>
#include <iomanip>
#include <set>
#include <cstdio>
#include <cstring>
#include <stack>
#include <string>
#include <map>
#include <vector>
#include <queue>
#include <deque>
#include <algorithm>
#include <cmath>
#include <sstream>
#include <bitset>
#include <ctime>
using namespace std;
#define mp make_pair
#define ull unsigned long long
#define ll long long
#define mod1 1000000009
#define mod (ll)1000000007
#define inf 2000000020000000000
#define mpi acos(-1.0)
#define M_E (double)2.71828182845

int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	//freopen("numbers.in", "r", stdin);
	//freopen("1.out", "w", stdout);
	int a, b, c;
	cin >> a >> b >> c;
	int res = max(max(((a + 1) / 2 - 1) * 3, ((b + 1) / 2 - 1) * 3 + 1), (c - 1) / 2 * 3 + 2);
	res = max(res, max(max(((a + 1) / 2 - 1) * 3 + 1, ((b + 1) / 2 - 1) * 3 + 2), (c - 1) / 2 * 3));
	res = max(res, max(max(((a + 1) / 2 - 1) * 3 + 2, ((b + 1) / 2 - 1) * 3), (c - 1) / 2 * 3 + 1));
	cout << res + 30 << endl;
	return 0;
}

#pragma comment(linker,"/STACK:64000000")
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <cmath>
#include <map>
#include <set>
#include <ctime>
#include <algorithm>
#include <cstdio>
#include <cstdlib>

using namespace std;

#define forn(i, n) for (int i = 0; i < (int) (n); ++i)

int x1, x2, x3;
int ans;

void readData () {
	scanf ("%d %d %d", &x1, &x2, &x3);
}

void solution () {
	ans = 30 + (((x1 - 1) / 2) * 3);
	ans = max (ans, 31 + (((x2 - 1) / 2) * 3));
	ans = max (ans, 32 + (((x3 - 1) / 2) * 3));
}

void writeData () {
	printf ("%d\n", ans);
}

int main()
{
	//freopen ("input.txt", "rt", stdin);
	//freopen ("output.txt", "wt", stdout);

	readData ();
	solution ();
	writeData ();
	return 0;
}

#include <iostream>
#include<cmath>

using namespace std;

int main()
{
	int r,g,b,p,q,s;
	cin>>r>>g>>b;
	if(r/2==0)
	{
		p=r/2;
	}
	else
	p=r/2+1;
	if(g/2==0)
	{
		q=g/2;
	}
	else
	q=g/2+1;
	if(b/2==0)
	{
		s=b/2;
	}
	else
	s=b/2+1;
	p=(p-1)*3+29;
	q=30+(q-1)*3;
	s=31+(s-1)*3;
	if(p>q&&p>s)
	cout<<p;
	if(q>p&&q>s)
	cout<<q;
	if(s>p&&s>q)
	cout<<s;
    return 0;
}

                                                                                #include<iostream>

using namespace std;

int main()
{
    int r,g,b;
    int a[3];
    cin>>a[0]>>a[1]>>a[2];
    int index = 0;
    int x = 0;
    for(int i=0;i<2;i++){
            if(a[i+1]>=a[i]){
                             index = i+1;
                             x = a[i+1];
                             }
            }
            int s;
    if(x%2==0){
               s = x/2;
               cout<<30+s+index+1<<endl;
               }
    else{
         s = x/2;
          cout<<s+index+2<<endl;
         }
   // getch();
    return 0;
    }

#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define r_0 return 0
#define fr first
#define se second
using namespace std;
ll  n , m   ,x  , i , z  ,c ,  used[1001] ,cnt , ans  , sum , rem , tre , ert ;
vector< ll >v , v1 ;
string s ,s1 ,s2;
vector< pair < ll , ll > > p ;
set < char > se ;
int main()
{
   cin >> n >> m >> x ;
   z = max( n , max( m , x ) ) ;
   cnt += 30 ;
   if( n >=2 )
    n-=2;
   else
    n = 0 ;
   while(true)
   {
       if( m >= 2 )
       cnt ++ , m -= 2 ;
      else if( m < 2)
      cnt ++ , m=0 ;
       if( n == 0 and m == 0 and x == 0 )
        break ;
      if( x >= 2 )
        x -=2 , cnt ++ ;
    else if( x < 2  )
        x = 0 , cnt ++ ;
    if( n == 0 and m == 0 and x == 0 )
        break ;
    if( n >= 2 )
        n -= 2 , cnt ++ ;
    else if( n < 2)
        n = 0 , cnt ++ ;
        //cout << n << " " << m << " " << x  << endl ;
    if( n == 0 and m == 0 and x == 0 )
        break ;
   }
   cout << cnt ;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int r,g,b,ans;
    cin>>r>>g>>b;
 if(b>=g&&b>=r)
    ans=30+3*(b+1)/2-1;
    else if(g>=r)
        ans=30+3*(g+1)/2-2;
    else
      ans=30+3*(r+1)/2-3;
    cout<<ans;

}

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

#define fi first
#define se second
#define mp make_pair
#define pb push_back

int main(){
    ios_base::sync_with_stdio(0); cin.tie(0);
    int r, g, b; cin >> r >> g >> b;
    map<int,int> p; p[r] = 0; p[g] = 1; p[b] = 2;
    int k = max(r,max(g,b));
    cout << k*3/2 + 30 + p[k] - 1;
}

#include<bits/stdc++.h>

using namespace std;

int main()
{
	int r, g, b, n, c=0;
	cin>>r>>g>>b;
	n=max(max(r, g), b);
	r=n;
	while(n)
	{
		if(n>=3)
			{ n-=2; c+=3; }
		else break;
	}
	n=r;
	if(n==b)
		c+=2;
	else
	if(n==g)
		c++;
	cout<<c+30;
	return 0;
}

#include <iostream>

using namespace std;

int main()
{   int r,g,b;
    bool chk=false,chk_1=false,chk_2=false;
    cin>>r>>g>>b;
    int ans=30;
    int cnt=0;
    r-=2;
    while( (r>0) || (g>0) || (b>0)){
        //cout<<r<<' '<<g<<' '<<b<<endl;
        if(r<0 && cnt!=0)
            chk=true;
        if(g<0)
            chk_1=true;
        if(chk & chk_1)
            chk_2=true;

       if(r>0 && cnt!=0){
        r-=2;
        cnt++;}
       // cout<<cnt<<endl;
        if(g>0){
            g-=2;
            cnt++;
            if(chk)
                cnt++;
            }
         //   cout<<cnt<<endl;
        if(b>0)
        {
            b-=2;
            cnt++;
            if(chk_1){
                cnt++;
                if(chk_2)
                    cnt++;
            }
        }
        //cout<<cnt<<endl;
    }
     //cout<<r<<' '<<g<<' '<<b<<endl;

        cout<<ans+cnt;

    return 0;
}

#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <string>
using namespace std;

int main()
{
	int r,g,b,i = 0,res = 30;

	cin>>r>>g>>b;

	while((r+g+b) > 0)
	{
		if(i == 0)
		{
			if(r > 1)
				r-=2;
			else
				if(r == 1)
					r--;
		}
		else
			if(i == 1)
			{
				if(g > 1)
					g-=2;
				else
					if(g == 1)
						g--;
			}
			else
			{
				if(b > 1)
					b-=2;
				else
					if(b == 1)
						b--;
			}

		i++;
		i%=3;
		res++;
	}

	cout<<res;
	return 0;
}