SPOJ ADDREV CLASSICAL