A company uses a three-digit number a1a2a3 to identify each product is sells. To make sure these numbers are transmitted correctly, it adds a fourth digit (the cake digit) a4 to each product number, creating the four-digit identification number a1a2a3a4. To do this, the first three digits of the number are added, a1+a2+a3, and the check digit a4 is assigned to be the last digit (the ones digit) of this sum.