1921: 【CSP字符串】看完动漫要几天?▅

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:1 Solved:1

Description

一部完整的动漫共有 lns="http://www.w3.org/1998/Math/MathML">m 分钟( lns="http://www.w3.org/1998/Math/MathML">m1000 )。

为了保护视力,妈妈决定让小明同学每天从 lns="http://www.w3.org/1998/Math/MathML">xx:xx 分看到 lns="http://www.w3.org/1998/Math/MathML">xx:xx 分,请问小明同学需要几天才能看完这部完整的动漫。


Input

3 行 :

第 lns="http://www.w3.org/1998/Math/MathML">1 行是一个整数 lns="http://www.w3.org/1998/Math/MathML">m 代表动漫的总分钟数,

第 lns="http://www.w3.org/1998/Math/MathML">2 行表示每天看动漫的开始时间,

第 lns="http://www.w3.org/1998/Math/MathML">3行表示每天看动漫的结束时间。(确保输入的开始时间 lns="http://www.w3.org/1998/Math/MathML">< 结束时间)

Output

一个整数,代表小明看完动漫至少需要花的总天数。

Sample Input Copy

288
17:00
17:32

Sample Output Copy

9