Andy, Bert, and Charles have 20 pieces of chocolate. Some of the chocolates have nuts, some are plain, and some are filled with caramel (they are split in a ratio of 1:2:2, respectively). Neither Andy nor Charles can eat nuts, and Charles will always take caramels over plain chocolates if he can (the others are indifferent to plain or caramels). If Andy, Bert, and Charles split the chocolates among themselves in a ratio of 3:1:1, respectively, in a way that makes each person as happy as possible, how many pieces of chocolate with caramel does Andy receive?