#K76242. Count Invalid Asset IDs
Count Invalid Asset IDs
Count Invalid Asset IDs
You are given a list of asset IDs. An asset ID is considered valid if and only if it lies in the range \( [1, 10^9] \). Otherwise, it is considered invalid. Your task is to determine the number of invalid asset IDs in the list.
The input consists of an integer \( n \) representing the number of asset IDs, followed by \( n \) space-separated integers. Print the count of asset IDs that are not within the valid range.
Example:
Input: 6\n1 -5 1000000001 999999999 5 0
Output: 3
inputFormat
The first line contains a single integer \( n \) (\(0 \le n \le 10^5\)), representing the number of asset IDs. The second line contains \( n \) space-separated integers denoting the asset IDs. Each asset ID can be any 32-bit or 64-bit signed integer.
outputFormat
Output a single integer representing the count of asset IDs that are invalid (i.e. those not in the range [1, \(10^9\)]).
## sample5
1 2 3 4 5
0