In a Coupa Business Spend Management activity stream, a binary string marks whether each position contains an active event (1) or an inactive gap (0). Return the minimum number of zeros that must be removed so that all 1 characters become consecutive.
You may remove zeros only. Zeros before the first 1 or after the last 1 do not need to be removed, because they do not separate active events.
Implement count_zeros_to_remove(s), where s is a non-empty string containing only 0 and 1 characters. Return an integer equal to the number of zeros located strictly between the first and last 1. If the string contains fewer than two 1 characters, return 0.
def count_zeros_to_remove(s):