Calculates arithmetical expression