SPOJ Cut the Silver Bar