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