<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described.
<END_TASK>
<USER_TASK:>
Description:
Count maximum concatenation of pairs from given array that are divisible by 3
Function to count pairs whose concatenation is divisible by 3 and each element can be present in at most one pair ; Stores count of array elements whose remainder is 0 by taking modulo by 3 ; Stores count of array elements whose remainder is 1 by taking modulo by 3 ; Stores count of array elements whose remainder is 2 by taking modulo by 3 ; Traverse the array ; Stores sum of digits of arr [ i ] ; Update digitSum ; If remainder of digitSum by by taking modulo 3 is 0 ; Update rem0 ; If remainder of digitSum by by taking modulo 3 is 1 ; Update rem1 ; Update rem2 ; Driver Code ; To display the result

<ASSISTANT_TASK:>
Python Code:
def countDiv(arr ) : 
	 rem0 = 0 
 rem1 = 0 
 rem2 = 0 
 for i in arr : 
	 digitSum = 0 
 for digit in str(i ) : 
	 digitSum += int(digit ) 
  if digitSum % 3 == 0 : 
	 rem0 += 1 
  elif digitSum % 3 == 1 : 
	 rem1 += 1 
  else : 
	 rem2 += 1 
   return(rem0 // 2 + min(rem1 , rem2 ) ) 
  arr =[5 , 3 , 2 , 8 , 7 ] 
 print(countDiv(arr ) ) 

<END_TASK>
