#C9068. Average Park Visit Time

    ID: 53120 Type: Default 1000ms 256MiB

Average Park Visit Time

Average Park Visit Time

You are given the entry and exit timestamps of visitors in a park for a single day. Each timestamp is in the format hh:mm:ss. Your task is to calculate the average time spent by the visitors in seconds. The average should be computed using floor division, i.e. the formula for the average is

$$\text{Average} = \left\lfloor \frac{\sum_{i=1}^{N} \text{duration}_i}{N} \right\rfloor$$

where N is the number of visitors and durationi is the time spent by the ith visitor. The result must be an integer. Use the given timestamps to determine the duration for each visitor.

inputFormat

The first line contains an integer N, representing the number of visitors.

The next N lines each contain two timestamps in the format hh:mm:ss, representing the entry time and the exit time of a visitor, separated by a space.

outputFormat

Output a single integer, which is the average time spent in the park by the visitors in seconds, rounded down to the nearest integer.

## sample
1
12:00:00 12:30:00
1800

</p>