fn ore(reactions: &[Reaction], amount: u64) -> u64
Run the reactions to find ore needed. Each chemical is processed only once, so we don’t need to track excess values of intermediate chemicals.