caluculating the fair of ticket.