works with k>=1

best result 3265 (K = 3)