Two doses should protect you for at least 20 years. You should preferably have the initial dose at least 2 weeks before you leave, although it can be given up to the day of your departure if needed.