calculate the server number