Measurement of the B0-B0bar mixing parameter and the forward-backward asymmetry