extension String: CollectionType {
    func at(idx: Int) -> Character {
        return self[self.startIndex.advancedBy(idx)]
    }
}
let s = readLine()!
let n = s.count
print("\(s.at(0))\(n-2)\(s.at(n-1))")