Implement friday problem