// youngjinp20
// 2021 06

#include<stdio.h>
#include<iostream>
#include<vector>
#include<stack>
#include<queue>
#include<algorithm>

#define by(x) [](const auto& a, const auto& b) { return a.x < b.x; }
#define byr(x) [](const auto& a, const auto& b) { return a.x > b.x; }
#define smax(a, b) ((a) < (b) ? ((a)=(b), true) : false)
#define smin(a, b) ((a) > (b) ? ((a)=(b), true) : false)
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
using namespace std;

typedef long long ll;

int main() {
	int N;
	cin >> N;
	int i=0;
	int ct=0;
	for (; N > ct; ct += ++i);
	cout << i;

	return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;
typedef vector<pll> vpll;
typedef vector<bool> vbl;
typedef vector<vector<bool>> vvbl;

void INX(){}
template<typename Head, typename... Tail>
void INX(Head&& head, Tail&&... tail)
{
    cin >> head;
    INX(forward<Tail>(tail)...);
}
void OUTX(){}
template<typename Head, typename... Tail>
void OUTX(Head&& head, Tail&&... tail)
{
    cout << head << endl;
    OUTX(forward<Tail>(tail)...);
}
void OUTX2(){cout << endl;}
template<typename Head, typename... Tail>
void OUTX2(Head&& head, Tail&&... tail)
{
    cout << head << ' ';
    OUTX2(forward<Tail>(tail)...);
}

#define ADD emplace_back
#define MP make_pair
#define VVEC(type) vector<vector<type>>
#define __LONG_LONG_MIN__ (-__LONG_LONG_MAX__ - 1)

//#define MOD 1000000007 // 10^9 + 7
//setprecision(10)

ll InputDecimalAsLL2(ll base)
{
    string s;
    INX(s);
    int pos = s.find('.');

    ll result1 = stoll(s.substr(0, pos));
    for(ll i = 0; i < base; i++) result1 *= 10;

    ll result2;
    if(pos < 0) result2 = 0;
    else {
        s = s.substr(pos + 1, s.size() - pos);
        ll ssize = (ll)s.size();
        s.resize(base + 1);
        for(ll i = ssize; i < base; i++) s[i] = '0';
        s[base] = '\0';
        result2 = (pos < 0) ? 0 : stoll(s);
    }
    
    return result1 + result2;
}


#define MUL 10000
ll MyCeil(ll x)
{
    if(x <= 0)
        return MUL * (x / MUL);
    else
        return MUL * ((x - 1) / MUL + 1);
}

ll MyFloor(ll x)
{
    if(x >= 0)
        return MUL * (x / MUL);
    else
        return MUL * ((x + 1) / MUL - 1);
}

int main()
{
    ll X, Y, R;
    X = InputDecimalAsLL2(4);
    Y = InputDecimalAsLL2(4);
    R = InputDecimalAsLL2(4);

    ll r2 = R * R;
    ll result = 0;
    for(ll nowx = MyCeil(X - R), endx = MyFloor(X + R); nowx <= endx; nowx += MUL)
    {
        ll tmp0 = nowx - X;
        tmp0 *= tmp0;
        ld tmp = sqrt((ld)(r2 - tmp0));
        ll uppery = MyFloor(Y + (ll)tmp) / MUL;
        ll lowery = MyCeil(Y - (ll)tmp) / MUL;
        if(uppery >= lowery)
        {
            result += uppery - lowery + 1;
        }
    }
    OUTX(result);


    return 0;
}
