Linear dynamical systems with integer constraints