Galoikin A.i.

Nine digits: $1,2,3, \ldots, 9$ are written in some order (so that a nine-digit number is formed). Consider all triples of consecutive digits, and find the sum of the corresponding seven three-digit numbers. What is the maximum possible value of this sum?