function multiply(a, b) {
  function getl(num) {
    const l = num.toString().indexOf('.')
    return l == -1 ? 0 : num.toString().length - l - 1
  }
  return (a*b).toFixed(getl(a) + getl(b))
}