Bad input checks and solves non-operational input (e.g. solving 322)