Didn't you listen to or read any of the information that you received at the AFCO. Ring them and ask the same question as I can't be bothered to give you a sensible answer. Unbelievable!! or just a wind up? It's difficult to tell these days
Once you sign on you have to stay for the first 28 days. Then you can give notice up to the 6 month point. After that you are likely to serve for 3 to 3.5 years before you can give 12 months notice. So you can get out in the first 6 months, then 4 to 4.5 years minimum.
The terms & conditions of service are also written on the S3049 Attestation Form given to all ratings several weeks before they join Raleigh. To cover all eventualities, the Master at Arms reads it to all new joiners before they are invited to sign-on at HMS Raleigh, usually on the Monday.