P10489 [IOI 1994] The Buses

Background

0x29 搜索 总结与练习

Description

A man arrives at a bus stop at 12:00. He remains there during 12:00-12:59. The bus stop is used by a number of bus routes. The man notes the times of arriving buses. The times when buses arrive are given. - Buses on the same route arrive at regular intervals from 12:00 to 12:59 throughout the entire hour. - Times are given in whole minutes from 0 to 59. - Each bus route stops at least 2 times. - The number of bus routes in the test examples will be

Input Format

Your program is to read from standard input. The input contains a number n (n

Output Format

Your program is to write to standard output. The output contains one integer, which is the fewest number of bus routes.