Fixed some logic for first task

Max Value: 5118
Location: 1010200018