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.
#输入r g b空格分隔
r,g,b = map(int , input().split())
def answer(r,g,b):
    #第一种情况：先取rgb的对应的bouquets再加上mix的
    bouquets1 = r//3 + g//3 + b//3 + min(r%3, g%3, b%3)
    #print('bouquets1:'+ str(bouquets1))
    #第二种情况：先取mix再取剩余的rgb个数。（实际好像只有第二种情况）
    bouquets = []
    yushus = [r%3 , g%3 , b%3]
    m = min(r,g,b)
    if yushus.count(2) == 2 and m != 0:
        m = 2
    elif yushus.count(1) == 2 and m !=0:
        m = 1
    else:
        m = min(r, g, b)
    #for m in range(0,m2 + 1,3):
    bouquets2 = (r - m)//3 + (g - m)//3 + (b - m)//3 + m
    #bouquets.append(tempbouquets)
    #print('bouquets2:'+ str(bouquets2))
    #maxbouquets = max(bouquets)
    maxbouquets = max(bouquets1,bouquets2)
    print(maxbouquets)
    return maxbouquets
answer(r,g,b)