A,B,C,D,E,F,G,H,I=map(int,input().split()) Q=A+B+C+D+E+F+G+H+I print(55-Q)