#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
int fun_1(int n){ //n为钱数
int count = 0; //可乐数
int empty = 0; //空瓶数
while (n){
count++;
empty++;
n--;
if (empty == 2){ //两个空瓶换一瓶可乐
n++; //相当于得一块钱
empty = 0; //换一次后空瓶数为0
}
}
return(count);
}
int main(){
int n;
scanf("%d", &n);
printf("%d", fun_1(n));
system("pause");
return 0;
}