SMS dit: The arithmetic of dynamical systems