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>
template <typename T = long long>
T next() {
  T result;
  std::cin >> result;
  return result;
}
template <typename T = long long, typename C = std::vector<T>>
C nextv(int n) {
  C result(n);
  for (size_t i = 0; i < n; ++i) {
    std::cin >> result[i];
  }
  return result;
}
template <typename T = long long, typename C = std::vector<T>>
C nextv() {
  int n;
  std::cin >> n;
  return nextv<T, C>(n);
}
struct pairhash {
  template <typename T, typename U>
  std::size_t operator()(const std::pair<T, U>& x) const {
    return std::hash<T>()(x.first) ^ std::hash<U>()(x.second);
  }
};
long long compute_gcd(long long a, long long b) {
  if (b == 0) return a;
  return compute_gcd(b, a % b);
}
unsigned long long compute_lcm(unsigned long long a, unsigned long long b) {
  unsigned long long gcd = compute_gcd(a, b);
  return a / gcd * b;
}
int mod_mul(int a, int b, int mod) { return ((long long)a * b) % mod; }
int mod_add(int a, int b, int mod) { return ((long long)a + b) % mod; }
long long choose(int n, int k) {
  if (k == 0 || n == 0) return 1;
  long long result = n * choose(n - 1, k - 1) / k;
  return result;
}
double distance(double point_x, double point_y, double line_x1, double line_y1,
                double line_x2, double line_y2) {
  double nom =
      abs((line_y2 - line_y1) * point_x - (line_x2 - line_x1) * point_y +
          line_x2 * line_y1 - line_y2 * line_x1);
  double denom = sqrt((line_y2 - line_y1) * (line_y2 - line_y1) +
                      (line_x2 - line_x1) * (line_x2 - line_x1));
  return nom / denom;
}
template <typename T>
T sign(T value) {
  if (value > 0) return 1;
  if (value < 0) return -1;
  return 0;
}
using namespace std;
long long rest(vector<long long> const& flowers) {
  auto minElem = *min_element(flowers.begin(), flowers.end());
  long long threes = 0;
  for (size_t i = 0; i < flowers.size(); ++i) {
    if (flowers[i] == 3) ++threes;
  }
  return max(minElem, threes);
}
int main() {
  ios_base::sync_with_stdio(false);
  auto flowers = nextv(3);
  long long result = 0;
  for (size_t i = 0; i < flowers.size(); ++i) {
    auto& color = flowers[i];
    if (color <= 3) continue;
    result += color / 3;
    color = color % 3;
    if (color == 0) {
      --result;
      color += 3;
    }
  }
  result += rest(flowers);
  cout << result;
  return 0;
}
