1376

Problem ID: 1376

See also: UVa 12187, LA 4473, br.SPOJ IRMAOS