first SPOJ problem solved