Just calculate the rollover as in the example. What exactly is the problem?