http://hihocoder.com/contest/hiho93/problem/1?sid=764530