Calculate required and shims in one derivation instead of 2