Simple C++ solution for 43