Enabling Robots to Adhere to Social Norms by Detecting F-Formations