#!/usr/bin/python # -*- coding: utf-8 -*- #A, B = map(int, raw_input().split()) #S = raw_input() L = raw_input() n = raw_input() array = map(int, raw_input().split()) ### sum = 0 n = 0 array.sort() for i in array: sum += i if num > L: print n break else: n += 1 else: print n