Derrick, Eric, and Frederick are standing in a line with Derrick in the back, Eric in the middle, and Frederick in the front. Each person is wearing a shirt with an integer between 1 and 5 inclusive printed on the back, and each person can only see the numbers on the backs of the people in front of them.

Garrick, who can see the numbers behind everyone's shirts, announces truthfully that all the numbers are unique and that they sum to a multiple of three. Then, he asks if anybody can figure out what number is on their own shirt.

Some time passes with nobody saying anything. Suddenly, Frederick states that he knows what number is on his shirt. What number is it?

**Details and Assumptions:**

- Assume that Derrick, Eric, and Frederick are all perfectly logical, i.e. they can deduce as much as they can from the information they are given.
- Assume that if a person figures out which number is on his back, then he will immediately say so. If he cannot figure it out, then he will keep quiet.