What is the ideal number of years of foreign language in high school?

Thanks everyone for all the replies!