On the distribution of queue size in queueing problems