#K92087. Maximum Unique Reservations

    ID: 38119 Type: Default 1000ms 256MiB

Maximum Unique Reservations

Maximum Unique Reservations

You are given a series of booking requests for a theater. Each booking request is represented by a triplet of integers: the show ID, the row number, and the seat number. A reservation is booked if and only if it has not been booked before. In other words, duplicate requests for the same seat (i.e., same show ID, row, and seat) are ignored.

Formally, let \(m\) be the number of booking requests and each request be represented as \((\textit{showID}, \textit{row}, \textit{seat})\). Your task is to compute the total number of unique reservations available.

inputFormat

The input is read from stdin and is structured as follows:

  1. The first line contains an integer \(m\) — the number of booking requests.
  2. The following \(m\) lines each contain three integers separated by spaces, representing \(\textit{showID}\), \(\textit{row}\), and \(\textit{seat}\) respectively.

outputFormat

Output a single integer to stdout — the number of unique reservations.

## sample
5
1 1 1
1 1 1
1 1 2
2 1 1
2 1 1
3