Simple C++ solution for 32