x=[int(i) for i in input().split()] m=0 for i in range(2): if x[i]<0: x[i]=-1*x[i] m+=x[i] r=x[2] r*=10 r=r//7 m+=r print(m)