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

#define rep2(x,from,to) for(int x=(from);(x)<(to);(x)++)
#define rep(x,to) rep2(x,0,to)
int main() {
	int n; 
	while(1) {
		if(scanf("%d", &n) == EOF) break;
		int total = 0;
		rep2(i,1,(600/n)) {
			total += n * n * i * n * i;
		}
		cout << total << endl;
	}
	return 0;
}
#include <bits/stdc++.h>
using namespace std;

int main(int argc, char const *argv[]) {
    map<string, int> day;
    day["SUN"] = 7;
    day["MON"] = 6;
    day["TUE"] = 5;
    day["WED"] = 4;
    day["THU"] = 3;
    day["FRI"] = 2;
    day["SAT"] = 1;

    string s;
    cin >> s;
    cout << day[s] << endl;
    return 0;
}
