If a firm hires labor for $12000 pays rent of $4000 pays $800 interest buys raw materials for $13000 earns profits of $1200 and sells its output for $31000 the total amount earned by factors of production at this firm is____________.