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.
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
using namespace std;
int MOD = 1e9 + 7;
long long int ji[300005];
long long int brut = 1e18;
int Search_Binary(int arr[], int left, int right, int key) {
  int midd = 0;
  while (1) {
    midd = (left + right) / 2;
    if (key < arr[midd]) {
      right = midd - 1;
    } else if (key > arr[midd]) {
      left = midd + 1;
    } else {
      return midd;
    }
    if (left > right) {
      return -1;
    }
  }
}
int fDig(int i) {
  int k;
  do {
    k = i;
    i /= 10;
  } while (i);
  return k;
}
int gcd(int a, int b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
int lcm(int a, int b) { return a / gcd(a, b) * b; }
int to_int(string s) {
  int x;
  stringstream geek(s);
  geek >> x;
  return x;
}
int prim_const(int x) {
  vector<bool> prime(x, true);
  prime[0] = prime[1] = false;
  for (int i = 2; i * i <= x; ++i) {
    if (prime[i]) {
      if (i * 1ll * i <= x) {
        for (int j = i * i; j <= x; j += i) {
          prime[j] = false;
        }
      }
    }
  }
  if (prime[x] == true) {
    return 1;
  } else {
    return 0;
  }
}
void solve(int a, int b, int c) {
  int d = min(a, min(b, c));
  a = a - d;
  b = b - d;
  c = c - d;
  if (a % 3 + b % 3 + c % 3 == 4 && d > 0) {
    d++;
  }
  cout << d + a / 3 + b / 3 + c / 3;
}
long long int drujba = 0;
int main() {
  cin.tie(0);
  cout.tie(0);
  int a, b, c;
  cin >> a >> b >> c;
  solve(a, b, c);
  cerr << "\nTime elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
}
