In July , the Hopkinton , Mass . , company agreed to buy Legato Systems of Mountain View for $ 1.3 billion .