LearnPy Hub
← Arena
AdvancedRating 1600

Strings on a Bit Budget

Each binary string costs its number of 0s and 1s. With at most z zeros and o ones in total, print the largest number of strings you can choose.

Input

n, z and o; then n binary strings separated by spaces.

Output

One integer.

Sample 1

Input
5 5 3
10 0001 111001 1 0
Output
4

Sample 2

Input
3 1 1
10 0 1
Output
2
solution.py
Output appears here
Strings on a Bit Budget · Python Arena problem · LearnPy Hub