The House of Representatives needed 36 ballots to elect Thomas Jefferson president in 1801.
Jefferson and Aaron Burr tied in the Electoral College under the original rules, which did not distinguish presidential from vice-presidential votes. The 12th Amendment fixed that in 1804.