Avoid bash specific functionality to work with any POSIX shell
implementing $(( )).