Under construction

Still being built. Things may change

Korea University Has an Official Wine

Time limit0.1sMemory limit256 MB

Summary
Sum the bottles bought in years 0 through C, where year n contributes Kn+Pn^2, given C, K, and P.
Level

Medium4 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

The following is an excerpt from a post on the Korea University portal about Korea University wine.

The university sold the official 100th anniversary wine 'La Cardonne 2000', followed by the wine donated by Chairman Park Jong-gu, 'Napa Valley 2000', along with the Korea University wines 'Clarendelle Rouge 2005', 'Clarendelle Rouge 2009', and 'Clarendelle Rouge 2011'. However, with those stocks depleted, sales have switched to 'Rasteau L'Andeol 2014' and 'Chateau Clarke 2014', which Korea University Future Crimson Store imports exclusively.

After reading this post, Subin set a goal of collecting Korea University wines. Simply collecting them would be no fun, so Subin decides to collect them according to a rule.

Subin defines the year of deciding to buy wine as year 0, and aims to buy Kn+Pn2 bottles in year n. K is a constant representing Subin's attachment to Korea University, and P is a constant representing Subin's shopping addiction.

Subin collected wine diligently in this way for C years. (The number of bottles bought in the final year is KC + PC2.)

The wine now fills Subin's room, making it hard to count how much has been collected.

Let us calculate how much wine Subin has collected.

Input

The first line gives the integers C, K, and P, separated by spaces, meaning the number of years Subin collected wine, Subin's attachment to Korea University, and Subin's shopping addiction. (0 ≤ C ≤ 100, 0 ≤ K ≤ 1000, 0 ≤ P ≤ 100)

Output

On the first line, print the number of bottles of wine Subin collected over C years.

Examples2

  1. Example 1

    Input
    3 1 1
    
    Expected output
    20
    
  2. Example 2

    Input
    5 28 27
    
    Expected output
    1905