#10000042. 【ABC414】A-Streamer Takahashi

内存限制:256 MiB 时间限制:1000 ms 标准输入输出
题目类型:传统 评测方式:文本比较
上传者: j27eGU

题目描述

Problem Statement

Streamer Takahashi has decided to stream from o'clock to o'clock(using -hour clock).

He has listenners, and the -th listener can watch the stream from o'clock to o'clock.

How many listeners can watch Takahashi's stream from beginning to end?

问题描述

主播高桥(Takahashi)决定从 点(采用 24 小时制)直播到 点。他有 位观众,其中第 位观众能够在 点到 点之间观看直播。那么,有多少位观众能够从头到尾完整观看高桥的直播?

输入格式

Input

The input is given from Standard Input in the following format:





输入

输入通过以下格式的标准输入给出:





输出格式

Output

Output the number of listeners who can watch Takahashi's stream from beginning to end.

输出

输出能够从头到尾观看高桥(Takahashi)的流媒体的听众数量。

样例

Sample Input 1|输入样例1

5 19 22
17 23
20 23
19 22
0 23
12 20

Sample Output 1|输出样例1

3

The listeners who can watch Takahashi's stream from beginning to end are the st, rd, and th listeners.
能够从头到尾观看高桥直播的听众是第1位,第3位,第4位观众。


Sample Input 2|输入样例2

3 12 13
0 1
0 1
0 1

Sample Output 2|输出样例2

0

No listeners can watch Takahashi's stream from beginning to end.
没有观众能从头到尾看完高桥的直播。


Sample Input 3|输入样例3

10 8 14
5 20
14 21
9 21
5 23
8 10
0 14
3 8
2 6
0 16
5 20

Sample Output 3|输出样例3

5

数据范围与提示

Constraints

数据约束

Constraints

此题面由文心一言和金山词霸提供。