So the answer here is n,
and to see this, let's start from the second part of the statement.
Let's say that a graph has a Hamiltonian cycle; then that means it can start
at one vertex and end at another, passing through every vertex on the way.
Now if each edge has a length 1, then the shortest tour from one end to the other
is going to pass through each of those edges.
And then the shortest tour for the given graph has a length of n.
Now let's say instead that we have a shortest tour for a given graph
with n vertices, and it has length n, with the stipulation that each edge has length 1.
Then we can simply use that shortest tour as the Hamiltonian cycle and be done.