Rofe-Beketov formula for symplectic systems