The first thing a visitor to the upcoming Olympic Games notices on arrival in the capital of the Soviet Union is the curious interplay of hospitality and inconvenience.

You can tell this immediately from the way the authorities search your avocados, but more about that later. The point is, the Soviet hosts want foreigners to feel welcome, but not at home . . . well-received, but not comfortable. Security arrangements are too stringent to be merely utilitarian. Surely, there is an element of intimidation involved.

Psychological confrontation between East and West is going to be an unavoidable theme of these controversial and troubled Olympics, and it manifest itself from the moment a visitor sets foot inside Sheremetyevo International Airport.

Only a half-dozen passengers disembared in Moscow yesterday from a Japan Airlines flight making an intermediary stop here on its way from London to Tokyo.

One of them was a member of the International Olympic Committee, the august body of 86 men who control the Olympic Games. He was met by a guide, translator and chauffeur and was whisked through passport and customs formalities. Undoubtedly, he will be wined and dined over the next few weeks treated, if not royally, at least in the best bourgeois fashion. The Moscow Games are the first ever held in a communist country, but the organizers in this theoretically classless society are on a par with their capitalist counterparts when it comes to buttering up officialdom.

The other five passengers, meanwhile, were rather snappishly directed downstairs to the regular passport authorities and one of the interminable waits that are an inescapable part of life in the Soviet Union.

"They've opened a brand new terminal for the Olympics, but the system never changes," shrugged a returning U.S. diplomat. The month-old terminal was designed and built by West Germans, commissioned by the Soviets to create a facsimile of the airport in Hamburg. The system for processing incoming visitors was designed and built by the Soviets, and it is typically cumbersome.

"If they ever had the 300,000 foreigners they originally expected for the Olympics, before the boycott," groused the diplomat, "it would have taken the people at the end of the line at least a week to get as far as the baggage claim."

Friday, with only a handful of people, it took three quarters of an hour. The somber, green-uniformed immigration officers of the U.S.S.R. are famous for giving new arrivals "the hairy eyeball," and for the Olympic influx they seem to have perfected this to an art form.

First, passport, visa and other required entry documents are requested. As he studies these papers, the officer intermittently fixes the visitor with an intense, unsmiling stare, as if trying to remember if he had seen the face before in some police lineup in Minsk . . . and making sure that he would remember if he ever sees it again. His concentration is such that you would swear he was photographing his subject with some hidden camera in his eyes.

Finally, he calls another officer into his curtained booth. They invariably reexamine the documents together and discuss them before waving the much-relieved visitor through.

After such solemn scrutiny at the first hurdle, the visitor is surprised to find himself greeted almost immediately by a multilingual lad in green Olympic T-Shirt and vinyl windbreaker. Asking if he can assist with the luggage. Thousands of Moscow youths -- bright and well-trained in languages -- have been recruited to serve as Olympic guides and translators, and they are friendly, helpful and eager to please. One just begins to think the Games won't be so grim after all with these kids around when they start apologizing for the length and slowness of the next line: the security check.

Much American-made equipment intended for the Moscow Games stayed in the U.S. after President Carter banned Olympic-bound exports in March, but X-ray security apparatus already had been shipped in quantity. It is much evidence.

All bags are X-rayed, and many are searched by hand, before they leave the airport. One of my bags was searched thoroughly. I was asked to turn on a tape recorder to prove that it was operative, and to explain what was on previously recorded cassettes.

But the Soviet authorities seemed most interested in two avocados and a couple of large artichokes that I had brought from a London greengrocer at the request of the Moscow correspondent of The Washington Post. Having limited access to fresh vegetables and produce -- although not nearly so limited as the average Soviet citizen -- the correspondent was eagerly looking forward to some variety in his evening salad.

The avocados underwent particularly close inspection. A guard looked at them, ran his hands over them and squeezed them as if to determine whether or not they were ripe. One moment I thought he was an avocado fetishist, and the next I imagined that he was going to confiscate them for his own dinner. But finally he put them back in my bag and waved me forward.

"He probably didn't know what they were. Chances are he had never seen an avocado," the correspondent for whom they were intended explained later. "He might have thought they were bombs. Did he appear to be looking for a fuse?"

In all, it had taken me and my avocados well over 90 minutes to clear airport formalities on a day of light traffic. But the best was yet to come.

On arrival at the Hotel Rossiya -- a huge, austere building of 6,000 rooms, reputedly the largest hotel in the world -- there was another security check. Before a guest is allowed in to register, he must empty his pockets and pass through a metal detector. His luggage is again searched -- even more exhaustively than at the airport. Two of my bags were rummaged through. A shaving kit was opened, all its contents examined, a razor disassembled. Perhaps they thought it was another tape recorder.

"What do they expect to find?" I asked a colleague, an old Moscow hand. "Perhaps they think I'm going to go to my room and highjack a lampshade."

"It's all part of the routine shakedown process," he said. "They want visitors to feel intimidated, so they want to instill a certain amount of fear and apprehension."

I nodded in agreement. "Besides," I said, "you never know when you might find an exploding avocado."

Having passed security check No. 2, I proceeded into the hotel lobby to check in. Here, once again, student guides and interpreters were ready, able, and more than willing to help. In fact, they couldn't have been nicer.

"It's hard to reconcile the two things -- the security and the scores to policemen everywhere on one hand, and the Welcome Wagon kids on the other," I said to my colleague.

"I's a curious place Moscow," he said. And what a curious Olympics this is going to be.