CF152A Marks

Description

Vasya, or Mr. Vasily Petrov is a dean of a department in a local university. After the winter exams he got his hands on a group's gradebook. Overall the group has $ n $ students. They received marks for $ m $ subjects. Each student got a mark from $ 1 $ to $ 9 $ (inclusive) for each subject. Let's consider a student the best at some subject, if there is no student who got a higher mark for this subject. Let's consider a student successful, if there exists a subject he is the best at. Your task is to find the number of successful students in the group.

Input Format

The first input line contains two integers $ n $ and $ m $ ( $ 1

Output Format

Print the single number — the number of successful students in the given group.

Explanation/Hint

In the first sample test the student number $ 1 $ is the best at subjects $ 1 $ and $ 3 $ , student $ 2 $ is the best at subjects $ 1 $ and $ 2 $ , but student $ 3 $ isn't the best at any subject. In the second sample test each student is the best at at least one subject.