Simple C++ solution for 55