Calculating top for a large time frame