#include<stdio.h>
int main(void){
  long int n,k,s;
  scanf("%ld",&n);
  k=n/15;
  s=60*(k+2)*k;
  switch(n%15){
    case 0:break;   
    case 1:s=s+1;break;  
    case 2:
    case 3:
      s=s+3;break;
    case 4:
    case 5:
    case 6:
      s=s+7;break;
    case 7:
      s=s+14;break;
    case 8:
    case 9:
    case 10:
      s=s+22;break;
    case 11:
    case 12:
      s=s+33;break;
    case 13:s=s+46;break;
    default:s=s+60;break;
  }
  printf("%ld",s);
 return 0; 
}
