(display (modulo (expt (modulo (read) 10) (modulo (read) 10)) 10)) (newline)