Calculating resource instance amounts