Frage im Vorstellungsgespräch bei Sticker Mule

Very basic hackerank question, someone who has recently started programming can also solve.