There are three types of secondary schools in Germany: Hauptschule which lasts 4-5 years and caters to average or below average students including those with learning disabilities or who are immigrants; Realschule which runs for 6 years and is for middle-ranked students, allowing them to take a final exam to attend vocational school or continue to Gymnasium; and Gymnasium which is 8 years and intended for the best students, culminating in the Abitur exam that allows university entrance.