In a party, every guest shook hand with the host. If there were 45 handshakes altogether, how many guests did the host invite?