Exact convergence rate of the last iterate in subgradient methods