CF365A Good Number

Description

Let's call a number $ k $ -good if it contains all digits not exceeding $ k $ ( $ 0,...,k $ ). You've got a number $ k $ and an array $ a $ containing $ n $ numbers. Find out how many $ k $ -good numbers are in $ a $ (count each number every time it occurs in array $ a $ ).

Input Format

The first line contains integers $ n $ and $ k $ ( $ 1

Output Format

Print a single integer — the number of $ k $ -good numbers in $ a $ .