#include <bits/stdc++.h>
using namespace std;
const long double pi = acos(-1.0);
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
bool checkprime(long long n) {
  long long i = 2;
  while (i * i <= n) {
    if (n % i == 0) return 0;
    i++;
  }
  return 1;
}
bool check(long long a[], long long n) {
  for (long long i = 0; i < n; ++i)
    if (a[i] != i + 1) return 1;
  return 0;
}
long long fact(long long n) {
  if (n == 0) return 1;
  return n * fact(n - 1);
}
long long sod(long long n) {
  long long sum = 0;
  while (n) {
    sum += n % 10;
    n /= 10;
  }
  return sum;
}
vector<long long> v;
long long bs(long long low, long long high, long long val) {
  long long mid = (low + high) / 2;
  if (low == high) return high;
  if (v[mid] >= val)
    return bs(low, mid, val);
  else
    return bs(mid + 1, high, val);
}
void lucky(long long n, long long cur, long long ct4, long long ct7,
           long long val) {
  if (n == cur) {
    if (ct4 == ct7) {
      v.push_back(val);
    }
    return;
  }
  lucky(n, cur + 1, ct4 + 1, ct7, val * 10 + 4);
  lucky(n, cur + 1, ct4, ct7 + 1, val * 10 + 7);
}
void DJ() {
  long long a, b, c, ans = 0, flag = 0;
  cin >> a >> b >> c;
  long long t = min(a, min(b, c));
  if ((a - t) % 3 == 2) {
    ans += (a - t) / 3 + (t > 0);
    if (t) flag = 1;
  } else {
    ans += (a - t) / 3;
  }
  if ((b - t) % 3 == 2) {
    ans += (b - t) / 3 + (t > 0);
    if (t) flag = 1;
  } else {
    ans += (b - t) / 3;
  }
  if ((c - t) % 3 == 2) {
    ans += (c - t) / 3 + (t > 0);
    if (t) flag = 1;
  } else {
    ans += (c - t) / 3;
  }
  cout << ans + t - flag;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) DJ();
  return 0;
}

### Prompt

In cpp, your task is to solve the following problem:

Fox Ciel has some flowers: r red flowers, g green flowers and b blue flowers. She wants to use these flowers to make several bouquets. There are 4 types of bouquets:

  * To make a "red bouquet", it needs 3 red flowers. 
  * To make a "green bouquet", it needs 3 green flowers. 
  * To make a "blue bouquet", it needs 3 blue flowers. 
  * To make a "mixing bouquet", it needs 1 red, 1 green and 1 blue flower. 



Help Fox Ciel to find the maximal number of bouquets she can make.

Input

The first line contains three integers r, g and b (0 ≤ r, g, b ≤ 109) — the number of red, green and blue flowers.

Output

Print the maximal number of bouquets Fox Ciel can make.

Examples

Input

3 6 9


Output

6


Input

4 4 4


Output

4


Input

0 0 0


Output

0

Note

In test case 1, we can make 1 red bouquet, 2 green bouquets and 3 blue bouquets.

In test case 2, we can make 1 red, 1 green, 1 blue and 1 mixing bouquet.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const long double pi = acos(-1.0);
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
bool checkprime(long long n) {
  long long i = 2;
  while (i * i <= n) {
    if (n % i == 0) return 0;
    i++;
  }
  return 1;
}
bool check(long long a[], long long n) {
  for (long long i = 0; i < n; ++i)
    if (a[i] != i + 1) return 1;
  return 0;
}
long long fact(long long n) {
  if (n == 0) return 1;
  return n * fact(n - 1);
}
long long sod(long long n) {
  long long sum = 0;
  while (n) {
    sum += n % 10;
    n /= 10;
  }
  return sum;
}
vector<long long> v;
long long bs(long long low, long long high, long long val) {
  long long mid = (low + high) / 2;
  if (low == high) return high;
  if (v[mid] >= val)
    return bs(low, mid, val);
  else
    return bs(mid + 1, high, val);
}
void lucky(long long n, long long cur, long long ct4, long long ct7,
           long long val) {
  if (n == cur) {
    if (ct4 == ct7) {
      v.push_back(val);
    }
    return;
  }
  lucky(n, cur + 1, ct4 + 1, ct7, val * 10 + 4);
  lucky(n, cur + 1, ct4, ct7 + 1, val * 10 + 7);
}
void DJ() {
  long long a, b, c, ans = 0, flag = 0;
  cin >> a >> b >> c;
  long long t = min(a, min(b, c));
  if ((a - t) % 3 == 2) {
    ans += (a - t) / 3 + (t > 0);
    if (t) flag = 1;
  } else {
    ans += (a - t) / 3;
  }
  if ((b - t) % 3 == 2) {
    ans += (b - t) / 3 + (t > 0);
    if (t) flag = 1;
  } else {
    ans += (b - t) / 3;
  }
  if ((c - t) % 3 == 2) {
    ans += (c - t) / 3 + (t > 0);
    if (t) flag = 1;
  } else {
    ans += (c - t) / 3;
  }
  cout << ans + t - flag;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) DJ();
  return 0;
}

```