#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <cmath>
using namespace std;
using ll = long long;

int main() {
    int x, y, z;
    cin >> x >> y >> z;

    int p = min(x, y);
    x -= p;
    y -= p;
    if (y) swap(x, y);
    int t = min(x, z);
    z -= t;
    p += t;
    p += z / 2;

    cout << p << endl;

    return 0;
}