2012 East Central Regional Contest Problem A:
http://acm.ashland.edu/2012/Problem-Set/Problems/2012.pdf