Problem28

/*
 * \file   problem028.cpp
 * \brief  うずまき
 *
 * \author Takushi Homma (b1006018@fun.ac.jp)
 * \date   2010/03/01 18:40:13
 */
#include <iostream>
using namespace std;

#define LEN 1001

int
main(int argc, char **argv)
{
    int ans = 1;
    int ru  = 1;

    for (int l = 3, d = 2; l <= LEN; l+=2, d+=2)
    {
        ans += d*10 + ru*4;
        ru  += (l-1) * 4;
    }

    cout << ans << endl;

    return 0;
}