Byteazar got a string S (s_1…s_n) of length n consisting of only digits '0', '1', and '2', and he wants to pick some disjoint subsequences which equal to 2020, as many as possible.
Formally, Byteazar would like to find k quadruples (a_1,b_1,c_1,d_1),…,(a_k,b_k,c_k,d_k) such as
Find the maximum value of k.
The input consists of several test cases terminated by end-of-file.
The first line of each test case contains an integer n (1≤n≤105). Second line contains the string S (s_1…s_n). (s_i∈0,1,2). Sum of n in all test cases does not exceed 106.
For each test case print an integer which denotes the result.