//
// main.cpp
// 11150 - Cola
//
// Created by Panks on 29/05/12.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#include <iostream>
using namespace std;
int main (int argc, const char * argv[])
{
int a, tmp;
while (cin>>a) {
if (a==1||a==0) {
cout<<a<<endl;
continue;
}
tmp=a;
a=a+a/2;
a=a-a%3;
cout<<tmp+(a/3)<<endl;
}
return 0;
}

No comments:
Post a Comment