Dots on the map of Antarctica shows the n polar stations, each of which has natural coordinates in a rectangular grid. The transition between the two stations is possible if the distance between them in a straight line less than two unit segments of the map. Stations, between which there exists a direct or indirect paths, are united into the land. Each station belongs to one land only.
You must find the number k of Arctic lands.
The first line contains the number n of stations. Each of the next n lines contains two numbers - the coordinates of each station. All values are positive integers and do not exceed 100.
Print the number of lands.