main=map read.words<$>getContents>>= \[a,b,c]->print$c`mod`25+(mod(b+c`div`25)4)+(mod(a+div(b+c`div`25)4)10)