solved 227 in mathematica