UVa1644 accepted.