RAI to FreeSurfer RAS

Do you know how to convert AFNI’s RAI coordinate to FreeSurfer’s RAS?
Tx.