#include long long int a[15] = {0, 0, 0, 2, 2, 4, 6, 6, 6, 8, 10, 10, 12, 12, 12}; int main(void) { long long int n; scanf("%lld", &n); long long int v = (n / 15) * 16 + a[n % 15]; printf("%d\n", v); return 0; }