party

You have decided to throw a party! Since a one-person party is quite no-life, you have decided to invite all your friends along! In addition, they have also invited their friends along as well. However, to prevent your house from overflowing with people, you have decided to draw the line there, friends-of-friends are the farthest you will go. Now, you want to find out exactly how many people are going down for your party (excluding yourself).

Given the number of people N as well as details of M friendships, output the number of people excluding yourself going down for your party. Note: Friendship is mutual! We aren't stalkers here :)

Input

The first line of input will contain N, the number of people (2 ≤ N ≤ 500). You are person 1.

The second line of input will contain M, the number of friendships (1 ≤ M ≤ 10,000).

The next M lines of input will contain two integers a and b, indicating that a and b are friends (1 ≤ a,bN). Remember, no stalking!

Output

Output one integer, the number of people going down for your party excluding yourself

Sample Input 1

6
5
1 2
1 3
3 4
2 3
5 4

Sample Output 1

3

Sample Input 2

6
5
2 3
4 3
5 4
5 6
2 5

Sample Output 2

0

Time Limit: 1 Seconds
Memory Limit: 256MB
Your best score: 0
Source: Dunjudge Archive

Subtask Score
1 100
2 0