https://www.luogu.com.cn/problem/P3954
"""
P3954 [NOIP2017 普及组] 成绩
https://www.luogu.com.cn/problem/P3954
"""
a,b,c=list(map(int,input().split()))
ans=a*2//10+b*3//10+c*5//10
print(ans)
https://www.luogu.com.cn/problem/P3954
"""
P3954 [NOIP2017 普及组] 成绩
https://www.luogu.com.cn/problem/P3954
"""
a,b,c=list(map(int,input().split()))
ans=a*2//10+b*3//10+c*5//10
print(ans)