convert server index to int