modidy the logic for caculate total if cards include 'A'