In a last ditch attempt to bring business to his fledgling architecture firm, Ted stays up 24 hours straight working on an pitch. With Ted refusing to leave his work, Marshall tries to lure Ted to the roof for a surprise 31st birthday party. However, before he makes it up to the roof, he is attacked by the goat Lily had rescued and left in the bathroom. After ending up in the hospital, the entire ordeal helps Ted realize that he needs to explore other career options, and he decides to take a job as a professor. Meanwhile, Barney finally decides to admit to Robin that he has feelings for her however, he is thrown when she beats him to the punch and says she is in love with him. Also, Marshall contemplates finally taking the leap from their building to a neighbor's roof.