#include<stdio.h>

int main(void){
  int N,i,sum;
  scanf("%d", &N);
  sum = (N/15)*60;
  for(i=1;i<N/15;i++)
    sum += 120*i;
  if(N%15 == 1)
    sum += N;
  if(N%15 == 2 || N%15 == 3)
    if(N%15 == 2)
      sum += 2*N - 1;
    else
      sum += 2*N - 3;
  if(N%15 == 4 || N%15 == 5 || N%15 == 6)
    if(N%15 == 4)
      sum += 3*N - 5;
    else if(N%15 == 5)
      sum += 3*N - 8;
    else
      sum += 3*N - 11;
  if(N%15 == 7)
    sum += 4*N - 14;
  if(N%15 == 8 || N%15 == 9 || N%15 == 10)
    if(N%15 == 8)
      sum += 5*N - 18;
    else if(N%15 == 9)
      sum += 5*N - 23;
    else
      sum += 5*N - 28;
  if(N%15 == 11 || N%15 == 12)
    if(N%15 == 11)
      sum += 6*N - 33;
    else
      sum += 6*N -39;
  if(N%15 == 13)
    sum += 7*N - 45;
  if(N%15 == 14 || N%15 == 15)
    if(N%15 == 14)
      sum += 8*N - 52;
    else
      sum += 8*N - 60;
  printf("%d\n", sum);
  return 0;
}