Invigilation
Time limit1sMemory limit512 MB
Given a polyline wall with towers, find the fewest cameras on the line y = H so that every tower is visible from at least one camera.
Problem
The Smurfs have built the Great Smurfy Wall. The wall is a sequence of points connected by straight wall segments. The Smurfs have also built towers on some of those points. Gargamel needs to observe all of those towers, but he cannot do it himself because wall segments can block his view. It is possible to see all towers from along the wall. He wants to place some cameras along a highway that runs near the wall. Cameras are very expensive, so Gargamel asks you to find the minimal number of cameras he needs.

Input
The first line contains integers and (, ). is the number of points on the wall, and specifies that the highway is the line . Each of the next lines describes a point of the Great Smurfy Wall with three integers (, , ). are the coordinates of the point, and if and only if there is a tower at that point. and are always . The points are given in strictly increasing order of .
Output
Output the minimal number of cameras Gargamel needs to use.