Find the length of the longest substring that contains at most 2 distinct characters.
Given a string s, find the length of the longest substring that contains at most 2 distinct characters.
s