#include <iostream>
#include <cstdio>
#include <string>
using namespace std;

int main() {
  string s; cin >> s;
  for(int i = s.size()-1; i >= 0; i--) printf("%c", s[i]);
  cout << endl;
}
#include<bits/stdc++.h>
using namespace std;
signed main(void){
	ios::sync_with_stdio(false);
	int d,ans;
	while(cin>>d){
		ans=0;
		for(int i=0;i<600;i+=d)
			ans+=i*i*d;
		cout<<ans<<endl;
	}
}