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.
from math import ceil
from math import floor	
	
def mod_expo(n, p, m):
	"""find (n^p)%m"""
	result = 1
	while p != 0:
		if p%2 == 1:
			result = (result * n)%m
		p //= 2
		n = (n * n)%m
	return result
	
def find_product(n, m, arr):
	"""find |arr i - arr j| mod m"""
	product=1
	if n <= m:
		for i in range(n):
			for j in range(i+1, n):
				 product = (product * abs(arr[i] - arr[j]))%m
		return product
	return 0

def count_tables(l):
	count=0
	l.sort()
	a = l[1]-l[0]
	b = l[2]-l[0]
	if a%3 > 0 and (a%3 + (b - (a - a%3))) >= 3:
		count += 1
	count += l[0] + (2*a)//3
	return count

def find_shawarma_location(n, ox, oy, px, py):
	mx=0
	best_x = ox
	best_y = oy
	for i in range(4):
		count = 0
		if i == 0:
			x = max(ox - 1, 0)
			y = oy
		elif i == 1:
			x = ox
			y = max(oy - 1, 0)
		elif i == 2:
			x = min(ox + 1, pow(10, 9))
			y = oy
		else:
			x = ox
			y = min(oy + 1, pow(10, 9))
		# print(x, y)
		for j in range(n):
			if min(px[j], ox) <= x <= max(px[j], ox):
				if min(py[j], oy) <= y <= max(py[j], oy):
					if x == ox and y == oy:
						continue
					else:
						count += 1
		# print (count)
		if mx < count:
			mx = count
			best_x = x
			best_y = y
	print(mx)
	print(best_x, best_y)
		
def get_bouquet_count(r, g, b):
	mx = floor(r/3) + floor(g/3) + floor(b/3)
	if r >= 1 and g >= 1 and b >= 1:
		mx = max(mx, 
		floor((r-1)/3) + floor((g-1)/3) + floor((b-1)/3) + 1)
	if r >= 2 and g >= 2 and b >= 2:
		mx = max(mx, floor((r-2)/3) + floor((g-2)/3) + floor((b-2)/3) + 2)
	return mx

t=1
# t=int(input())
while t:
	t = t - 1
	count=0
	# n, ox, oy = map(int, input().split())
	px = []
	py = []
	r, g, b = map(int, input().split())
	# l = list(map(int, input().strip().split()))[:3]
	print(get_bouquet_count(r, g, b))

	
