#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n;
  cin >> n;
  int syou = n/15;
  int amari = n%15;
  int sum = 0;
  for(int i = 0;i<shou;i++){
    sum += 60+120*i;
  }
  if(amari == 1){
    sum += 15*shou+1;
  }else if(amari == 2){
    sum += 30*shou+3;
  }else if(amari == 3){
    sum += 30*shou+3;
  }else if(amari == 4){
    sum += 45*shou+7;
  }else if(amari == 5){
    sum += 45*shou+7;
  }else if(amari == 6){
    sum += 45*shou+7;
  }else if(amari == 7){
    sum += 60*shou+14;
  }else if(amari == 8){
    sum += 75*shou+22;
  }else if(amari == 9){
    sum += 75*shou+22;
  }else if(amari == 10){
    sum += 75*shou+22;
  }else if(amari == 11){
    sum += 90*shou+33;
  }else if(amari == 12){
    sum += 90*shou+33;
  }else if(amari == 13){
    sum += 105*shou+46;
  }else if(amari == 14){
    sum += 120*shou+60;
  }
  cout << sum << endl;
}
