{"raw_statement":[{"iden":"problem statement","content":"Takahashi recorded his daily life for the last few days as a integer sequence of length $2N$, as follows:\n\n*   $a_1, b_1, a_2, b_2, ... , a_N, b_N$\n\nThis means that, starting from a certain time $T$, he was:\n\n*   sleeping for exactly $a_1$ seconds\n*   then awake for exactly $b_1$ seconds\n*   then sleeping for exactly $a_2$ seconds\n*   :\n*   then sleeping for exactly $a_N$ seconds\n*   then awake for exactly $b_N$ seconds\n\nIn this record, he waked up $N$ times.\nTakahashi is wondering how many times he waked up early during the recorded period.\nHere, he is said to _wake up early_ if he wakes up between $4:00$ AM and $7:00$ AM, inclusive.\nIf he wakes up more than once during this period, each of these awakenings is counted as waking up early.\nUnfortunately, he forgot the time $T$.\nFind the maximum possible number of times he waked up early during the recorded period.\nFor your information, a day consists of $86400$ seconds, and the length of the period between $4:00$ AM and $7:00$ AM is $10800$ seconds."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 10^5$\n*   $1 \\leq a_i, b_i \\leq 10^5$\n*   $a_i$ and $b_i$ are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$\n$a_1$ $b_1$\n$a_2$ $b_2$\n:\n$a_N$ $b_N$"},{"iden":"sample input 1","content":"3\n28800 57600\n28800 57600\n57600 28800"},{"iden":"sample output 1","content":"2"},{"iden":"sample input 2","content":"10\n28800 57600\n4800 9600\n6000 1200\n600 600\n300 600\n5400 600\n6000 5760\n6760 2880\n6000 12000\n9000 600"},{"iden":"sample output 2","content":"5"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}