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