#include <bits/stdc++.h>
using namespace std;
long long factorial(long long n) {
  return (n == 1 || n == 0) ? 1 : n * factorial(n - 1);
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
bool sortByVal(const pair<long long, long long> &a,
               const pair<long long, long long> &b) {
  if (a.first == b.first)
    return a.second < b.second;
  else
    return a.first > b.first;
}
long long Powb(long long b, long long n) {
  if (n == 0) return 1LL;
  if (n == 1) return b;
  long long temp = Powb(b, n / 2);
  if (n % 2 == 0) {
    return (temp * temp) % 1000000007LL;
  } else {
    return (b * ((temp * temp) % 1000000007LL)) % 1000000007LL;
  }
}
long long root(vector<long long> &a, long long i) {
  while (a[i] != i) {
    a[i] = a[a[i]];
    i = a[i];
  }
  return i;
}
void wunion(vector<long long> &a, vector<long long> &size, long long i,
            long long j) {
  long long root_i = root(a, i);
  long long root_j = root(a, j);
  if (root_i == root_j) return;
  if (size[root_i] < size[root_j]) {
    a[root_i] = a[root_j];
    size[root_j] += size[root_i];
    size[root_i] = 0;
  } else {
    a[root_j] = a[root_i];
    size[root_i] += size[root_j];
    size[root_j] = 0;
  }
}
long long cal(long long r, long long g, long long b, long long y) {
  if (y > r || y > g || y > b) return 0;
  return y + (r - y) / 3 + (g - y) / 3 + (b - y) / 3;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int t = 1;
  while (t--) {
    long long i, j, m, n, k, sum = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0,
                             maxi = 0;
    cin >> c >> d >> e;
    f = max(cal(c, d, e, 0), max(cal(c, d, e, 1), cal(c, d, e, 2)));
    cout << f << "\n";
  }
}

### 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;
long long factorial(long long n) {
  return (n == 1 || n == 0) ? 1 : n * factorial(n - 1);
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
bool sortByVal(const pair<long long, long long> &a,
               const pair<long long, long long> &b) {
  if (a.first == b.first)
    return a.second < b.second;
  else
    return a.first > b.first;
}
long long Powb(long long b, long long n) {
  if (n == 0) return 1LL;
  if (n == 1) return b;
  long long temp = Powb(b, n / 2);
  if (n % 2 == 0) {
    return (temp * temp) % 1000000007LL;
  } else {
    return (b * ((temp * temp) % 1000000007LL)) % 1000000007LL;
  }
}
long long root(vector<long long> &a, long long i) {
  while (a[i] != i) {
    a[i] = a[a[i]];
    i = a[i];
  }
  return i;
}
void wunion(vector<long long> &a, vector<long long> &size, long long i,
            long long j) {
  long long root_i = root(a, i);
  long long root_j = root(a, j);
  if (root_i == root_j) return;
  if (size[root_i] < size[root_j]) {
    a[root_i] = a[root_j];
    size[root_j] += size[root_i];
    size[root_i] = 0;
  } else {
    a[root_j] = a[root_i];
    size[root_i] += size[root_j];
    size[root_j] = 0;
  }
}
long long cal(long long r, long long g, long long b, long long y) {
  if (y > r || y > g || y > b) return 0;
  return y + (r - y) / 3 + (g - y) / 3 + (b - y) / 3;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int t = 1;
  while (t--) {
    long long i, j, m, n, k, sum = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0,
                             maxi = 0;
    cin >> c >> d >> e;
    f = max(cal(c, d, e, 0), max(cal(c, d, e, 1), cal(c, d, e, 2)));
    cout << f << "\n";
  }
}

```