def base_amount(faan):
  """
  Return the base amount for a given number of faan.
  Under one-n-two bucks (一二文) and half-spicy increase (半辣上):
    Faan  Amount
      0       1
      1       2
      2       4
      3       8
      4      16
      5      24
      6      32
      7      48
      8      64
      9      96
     10     128
  etc. (i.e. doubling up to 4 faan,
  then midpoint insertions for odd faan)
  """
  
  if faan <= 4:
    return 2 ** faan
    
  elif faan % 2 == 1:
    return 24 * 2 ** ((faan - 5) // 2)
    
  else:
    return 32 * 2 ** ((faan - 6) // 2)