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>
using namespace std;
inline void RD(int &ret) {
  char c;
  do {
    c = getchar();
  } while (c < '0' || c > '9');
  ret = c - '0';
  while ((c = getchar()) >= '0' && c <= '9') ret = ret * 10 + (c - '0');
}
bool vis1[105], vis2[105];
void tired() {
  int r, g, b;
  cin >> r >> g >> b;
  int n1 = r % 3;
  int n2 = g % 3;
  int n3 = b % 3;
  int num = 0;
  if (n1 <= r && n1 <= g && n1 <= b)
    num = max(num, (r - n1) / 3 + (g - n1) / 3 + (b - n1) / 3 + n1);
  if (n2 <= r && n2 <= g && n2 <= b)
    num = max(num, (r - n2) / 3 + (g - n2) / 3 + (b - n2) / 3 + n2);
  if (n3 <= r && n3 <= g && n3 <= b)
    num = max(num, (r - n3) / 3 + (g - n3) / 3 + (b - n3) / 3 + n3);
  cout << num << endl;
}
int main() {
  tired();
  return 0;
}
