Calculating the terminal total width