Title: Riemann Problem, Complete Integrability and Arithmetic Applications