L=gets.to_i M=gets.to_i N=gets.to_i def ryougae(x,y,z) total = x + y * 25 + z * 100 s4 = (total / 1000).to_i s3 = ((total % 1000) / 100).to_i s2 = (((total % 1000) % 100) / 25).to_i s1 = (((total % 1000) % 100) % 25).to_i return s3 + s2 + s1 end puts ryougae(N,M,L)