#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  long long ans;
  int x, y, result;
  
  x = N / 15;
  y = N % 15;
  switch(y){
    case 1:
  	  result = 1 + 15 * x;
      break;
    case 2:
    case 3:
      result = 3 + 15 * x * 2;
      break;
    case 4:
    case 5:
    case 6:
      result = 7 + 15 * x * 3;
      break;
    case 7:
      result = 14 + 15 * x * 4;
      break;
    case 8:
    case 9:
    case 10:
      result = 22 + 15 * x *5;
      break;
    case 11:
    case 12:
      result = 33 + 15 * x * 6;
      break;
    case 13:
      result = 46 + 15 * x * 7;
      break;
    case 14:
    case 15:
      result = 60 + 15 * x * 8;
      break;
  }
    
   ans = 60 * x * x + result;
   cout << ans << endl;   
}
