calculate available resources