a,b,c,d,e,f,g,h,i = map(int,input().split()) print(int(55-a-b-c-d-e-f-g-h-i))