Add parentheses to fix order of operations logic error