The greatest happiness principle