Earn or Unlock

Problem Name:
Earn or Unlock
Site:CodeForces
Links:
Tags:
Problem setters: