1057

Problem ID: 1057

See also: UVa 11160, LOJ 1055