← Home
```go
package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	in := bufio.NewReader(os.Stdin)
	var n int
	fmt.Fscan(in, &n)

	if n == 0 {
		fmt.Println(0)
		return
	}

	maxCashes := 1
	currentCashes := 1
	var lastH, lastM int
	fmt.Fscan(in, &lastH, &lastM)

	for i := 1; i < n; i++ {
		var h, m int
		fmt.Fscan(in, &h, &m)
		if h == lastH && m == lastM {
			currentCashes++
		} else {
			if currentCashes > maxCashes {
				maxCashes = currentCashes
			}
			currentCashes = 1
			lastH = h
			lastM = m
		}
	}
	if currentCashes > maxCashes {
		maxCashes = currentCashes
	}

	fmt.Println(maxCashes)
}
```