Converting String Input Into Integer Rules