17th President. As an exercise, look up numbers 2 through 16, with the first being John Hancock.
Witness the curious fact that when most of us 1st heard “GW wasn’t really 1st”, it was pointed out that John Hanson was - under the Articles of Confederation (again, legislative). Apparently now the definition has expanded further. I gather from your Hancock reference you mean the presidents of the previous Congresses, which would mean the 1st was Peyton Randolph, not Hancock.
As it is, the President of the United States is completely different from the president of the Congresses (legislature). The factoids about the “1st president” trying to sound more cunning than all of us who only heard “GW” in class are really very moot.