#include <iostream>
#include <vector>
using namespace std;

int d;
int sum = 0;
int j = 0;
int a[10000];

int main() {
int x;
while (~scanf("%1d",&x)) {
a[j++] = x;
}
  for (int l = 0; l <= j; l++){
  for(int i = 1; i <= (600-a[j]) / a[j]; i++){
  sum += a[j]*((i*a[j])*(i*a[j]));
    }
  }
    cout << sum << endl;
  }