5 students like Geometry only,

2 students like Calculus only,

3 students like Algebra only,

21 students like both Geometry and Calculus,

16 students like both Algebra and Calculus,

9 students like Algebra, Calculus and Geometry,

None of the students hate any of the three subjects.

How many students like both Algebra and Geometry?