1st problem for google code jam